RDF Description Element

Each resource that you want to describe in RDF gets its own <rdf:Description> element. This element has several attributes:

  • about lets you specify what resource the element describes.

  • aboutEach lets you make statements about each of the element's children.

  • aboutEachPrefix lets you select RDF container items by prefix.

  • bagID specifies the ID of an associated bag container.

  • ID lets you give the element an ID value.

  • type specifies the description's type.

In fact, you can also convert the properties that you list in the <rdf:Description> element into attributes, as we'll see when we take a look at the RDF abbreviated syntax.

In our example, the resource being described is the document http://www.starpowder.com/planets.html , so I assign that URI to the about attribute of the <rdf:Description> element:

 <?xml version="1.0" ?>  <rdf:RDF     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">  <rdf:Description about="http://www.starpowder.com/planets.html">   .   .   .   </rdf:Description>  </rdf:RDF> 

In other words, you use the about attribute to specify the statement's subject. To actually say something about the resource, you use property elements.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net