O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required