RDF identifiers

From Exterior Memory
Jump to: navigation, search

There are three ways to point from one RDF object to another RDF object in a RDF XML file:

<author rdf:resource="#a" />
<Person rdf:about="#a" />
<author rdf:resource="#a" />
<Person rdf:ID="a" />
<author rdf:nodeID="a" />
<Person rdf:nodeID="a" />

The current best practice is to use rdf:about to refer to a rdf:resource object, unless you know exactly what

  • A rdf:about resource does not have to be unique. A rdf:ID or rdf:nodeID must be unique.
  • You can refer to a rdf:about or rdf:ID resource from an external file, but not to a rdf:nodeID.
  • rdf:ID and rdf:nodeID have the same syntax as the ID attribute in XML, and must match [A-Za-z_][A-Za-z0-9\u0080-\uFFFF_.-]*. rdf:about may contain more characters, like :.
  • The rdf:ID is implicitly appended to the base URI, and a "#" character.
  • rdf:about can be an absolute or relative URI.
  • You can use xml:base to change the base URI.