RDF correct approach to subClassOf

Posted by Macarse on Stack Overflow See other posts from Stack Overflow or by Macarse
Published on 2010-05-13T12:22:59Z Indexed on 2010/05/13 12:24 UTC
Read the original article Hit count: 455

Filed under:

I am learning RDF. What's the difference between this 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>

© Stack Overflow or respective owner

Related posts about rdf