Difference between revisions of "Follow your nose"

From OpenOrg
Jump to: navigation, search
(Created page with "Ideally all the main information required for a service should be available from the same RDF document. Most notably trivial things like rdfs:label. The normal semantic web appr...")
 
Line 8: Line 8:
  
 
To indicate that more triples are available about URI-X use the following pattern. It is assumed that ''RDF-URL'' will resolve to a document containing triples in one of following formats: RDF+XML, Turtle, N3, N-Triples.
 
To indicate that more triples are available about URI-X use the following pattern. It is assumed that ''RDF-URL'' will resolve to a document containing triples in one of following formats: RDF+XML, Turtle, N3, N-Triples.
 
+
<syntaxhighlight lang="xml">
 
   <rdf:Description rdf:about="...URI-X...">
 
   <rdf:Description rdf:about="...URI-X...">
 
     <rdfs:label>the name of the thing for which more data is available</rdfs:label>
 
     <rdfs:label>the name of the thing for which more data is available</rdfs:label>
Line 17: Line 17:
 
     <rdf:type rdf:resource="http://purl.org/xtypes/Document-RDFSerialisation" />
 
     <rdf:type rdf:resource="http://purl.org/xtypes/Document-RDFSerialisation" />
 
   </rdf:Description>
 
   </rdf:Description>
 
+
</syntaxhighlight>
 
If many URIs all are seeAlso to the same URL then the rdf:type bit is only required once.  
 
If many URIs all are seeAlso to the same URL then the rdf:type bit is only required once.  
  

Revision as of 18:56, 10 January 2011

Ideally all the main information required for a service should be available from the same RDF document. Most notably trivial things like rdfs:label.

The normal semantic web approach to finding more information is to:

  1. Resolve the URI to see if it gets more triples
  2. Follow any seeAlso relationships from the URI to see if it gets more triples.

However if you want to explicitly indicate the URL of a source of additional data, that can be useful and save worthless lookups (eg. resolving a seeAlso link, only to end up with a 50Mb PDF document)

To indicate that more triples are available about URI-X use the following pattern. It is assumed that RDF-URL will resolve to a document containing triples in one of following formats: RDF+XML, Turtle, N3, N-Triples. <syntaxhighlight lang="xml">

 <rdf:Description rdf:about="...URI-X...">
   <rdfs:label>the name of the thing for which more data is available</rdfs:label>
   <rdfs:seeAlso rdf:resource="...RDF-URL..." />
 </rdf:Description>

 <rdf:Description rdf:about="...RDF-URL...">
   <rdf:type rdf:resource="http://purl.org/xtypes/Document-RDFSerialisation" />
 </rdf:Description>

</syntaxhighlight> If many URIs all are seeAlso to the same URL then the rdf:type bit is only required once.

This pattern is particularly recommended if many URIs from a document all redirect to the same final RDF document.

This pattern also allows you to avoid minting your own URIs for things which already have them (eg. UK railway stations), but still provide additional information about them.

SPARQL

If your RDF is getting complicated, it's probably time to import it into a SPARQL endpoint. If you provide a link to the SPARQL at the top of an RDF document, then you may omit this pattern and should (if possible) not import these into SPARQL, where they will have no value.