Skip to content


Anonymos blibbles in RDF

I learned today that you are allowed to name the little anonymous bits in RDF with URIs, and in fact it makes things easier as they don’t keep getting assigned new URIs each time someone decodes them.

So take this bit of RDF:

<bibo:Article rdf:about="http://eprints.ecs.soton.ac.uk/id/eprint/23">
	<dct:creator 
rdf:resource='http://eprints.ecs.soton.ac.uk/resource/person/242'/>
	<bibo:authorList>
		<rdf:Seq>
			<rdf:_1 
rdf:resource='http://eprints.ecs.soton.ac.uk/resource/person/242'/>
                </rdf:Seq>
	</bibo:authorList>
</bibo:Article>

Apparently I could give rdf:about attributes to the subelements:

<bibo:Article rdf:about="http://eprints.ecs.soton.ac.uk/id/eprint/23">
	<dct:creator 
rdf:resource='http://eprints.ecs.soton.ac.uk/resource/person/242'/>
	<bibo:authorList>
		<rdf:Seq 
rdf:about="http://eprints.ecs.soton.ac.uk/id/eprint/23#authorlistseq">
			<rdf:_1 
rdf:resource='http://eprints.ecs.soton.ac.uk/resource/person/242'/>
		</rdf:Seq>
	</bibo:authorList>
</bibo:Article>

This makes me happier as it means I can more easily understand how we get from RDF+XML to triples, and back. Only every other depth of tag can have a rdf:about as it alternates between thing-tags and relationship tags.

A second cool thing that it helps to have my head-around is the meaning of the thing-tags (not the relationship tags). Basicically:

<any-old-tag>
   <rdf:type rdf:resource="http://badger.org/ns#burrow"/>
   ....
</any-old-tag>

means the same as:

<myns:burrow xmlns:myns="http://badger.org/ns#b">
  ....
</myns:burrow>

(ignoring the information from any-old-tag)

This is still a learning process, so if I’ve made any mistakes, let me know at cjg@ecs.soton.ac.uk — it’s a venial sin to leave misinformation lying around the web!

Posted in Uncategorized.

Tagged with .