What's the difference between these two approaches?
a)
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:tur="http://www.blah.com/turismo#">
<rdf:Description rdf:about="http://www.blah.com/turismo#plaza">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.blah.com/turismo#plazaSinFuente">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
<rdfs:subClassOf rdf:resource="http://www.blah.com/turismo#plaza"/>
</rdf:Description>
b)
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:tur="http://www.blah.com/turismo#">
<rdfs:Class rdf:ID="plaza"/>
<rdfs:Class rdf:ID="plazaSinFuente">
<rdfs:subClassOf rdf:resource="#plaza"/>
</rdfs:Class>
Here you have a nice comparison: http://www.ibm.com/developerworks/xml/library/x-tiprdfai.html
Quote from the conclusion:
As for choosing between rdf:ID and rdf:about, you will most likely want to use the former if you are describing a resource that doesn't really have a meaningful location outside the RDF file that describes it. Perhaps it is a local or convenience record, or even a proxy for an abstraction or real-world object (although I recommend you take great care describing such things in RDF as it leads to all sorts of metaphysical confusion; I have a practice of only using RDF to describe records that are meaningful to a computer). rdf:about is usually the way to go when you are referring to a resource with a globally well-known identifier or location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With