Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RDF correct approach to subClassOf

Tags:

rdf

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>
like image 664
Macarse Avatar asked May 13 '10 12:05

Macarse


1 Answers

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.

like image 163
mgv Avatar answered Sep 27 '22 21:09

mgv