Using Abbreviated RDF Syntax

The W3C also defines an abbreviated RDF syntax to make things a little easier. To use the abbreviated syntax, you just convert property elements to attributes of the <rdf:Description> element. For example, here's what an unabbreviated document might look like:

 <?xml version="1.0" ?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/DC/"> <rdf:Description about="http://www.starpowder.com/mercury.html"> <dc:Creator>Nicolas Copernicus</dc:Creator> <dc:Title>Mercury</dc:Title> <dc:Type>text</dc:Type> </rdf:Description> <rdf:Description about="http://www.starpowder.com/venus.html"> <dc:Creator>Nicolas Copernicus</dc:Creator> <dc:Title>Venus</dc:Title> <dc:Type>text</dc:Type> </rdf:Description> ...

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