Referring to Resources by Reference

There's another way to refer to a resource that describes a property: You can give the resource's URI using the rdf:resource attribute. You use this attribute in the property element. Here's an example; in this case, I'm referring to the resource NickC.html to describe the creator of various documents:

Listing . ch18_08.rdf
 
<?xml version="1.0" ?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://www.purl.org/DC/">

    <rdf:Description about="http://www.starpowder.com/mercury.html">
        <dc:Title>Mercury</dc:Title>
        <dc:Creator rdf:resource="http://www.starpowder.com/NickC.html"/> </rdf:Description> <rdf:Description about="http://www.starpowder.com/venus.html"> <dc:Title>Venus</dc:Title> ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.