RDF Syntax

RDF documents are made of RDF statements that describe resources. Each statement has three parts , so it's called a triple. Here are the three parts of an RDF statement:

  • A resource . Resources are typically Web documents that you point to with a URI.

  • A named property . Such a property is a specific characteristic or attribute of the resource, such as the resource's creator.

  • A property value . The value of the property is the property's content. For example, the value of the <Creator> property is usually the name of the resource's creator.

An RDF statement, then, is made up of a resource, a named property, and a property value. In RDF, you name these three parts like this:

  • The resource is called the subject of the statement.

  • The named property is called the predicate of the statement.

  • The property value is called the object of the statement.

Here's a simple example RDF document:

Listing ch18_04.rdf
 <?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">         <Creator>Nicolas Copernicus</Creator>     </rdf:Description> </rdf:RDF> 

In this case, the subject is the document http://www.starpowder.com/planets.html , the predicate is the named property Creator , and the object is the name of the document's creator, Nicolas Copernicus. To understand RDF, I'm going to take this document apart piece-by-piece now.



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