This section describes XML syntax. It uses the XML namespace notations, but the expanded
names are obtained simply by concatenating a namespace to an element name.
A D V E R T I S E M E N T
Hence we will
use same convention as in the previous section for prefixes RDF: and RDFS:.
An RDF document is the list of descriptions. Usually each description applies to one
resource, and contains the list of properties. Property values are either the URIs,
literals or any other Descriptions.
In XML, the RDF meta-data are embedded in the element named "rdf:RDF". This element
do contains the sequence of elements named RDF:Description. Those elements can have
one of the two attributes either RDF:about or the RDf:ID (but not both of them).
RDF:about is used to describe any of the resource; its value is either an absolute URI
or the relative URI.
RDF:ID is used to define the resource; its value is the fragment identifier (without
"#" character) to be added to an XML document URI. The resource may not be defined more
The description without an RDF:about nor RDF:ID is said to describe an anonymous resource.
An element RDF:Description contains the sequence of XML elements. Those elements are
interpreted as the properties, whose predicate's URI is an expanded name of the element.
If an element is empty, it should have an attribute RDF:resource whose value is the
object's URI (see dc:Creator in the fig below). Else, it can contain the plain text
(then is interpreted as a literal - see dc:Title in the fig below) or a single embedded
RDF:Description element (see dc:Creator in the fig below).
<dc:Title> Index of my web site </dc:Title>
In case of an ambiguity, the attribute RDF:parseType can be used in the property
elements with a "Resource" or a "Literal" value. The latter can be used when the literal
contains XML tags, to prevent being parsed as an description.
The syntax might also be abbreviated in two ways:
Description elements name can be replaced by any URI. It is interpreted as
additional RDF:type property, valued by a named resource. Note that the context always
allows to differ the typed description element from the property element.
properties with the literal values can be written as attributes for the description
elements rather than the embedded elements.
Consider for an example, the following description:
<rdf:label> father of
As mentioned earlier RDF containers are defined as the part of XML
syntax. A container node is described with the special element named RDF:Bag, RDF:Seq
or the RDF:Alt (those elements can be used instead of the RDF:Description elements).
Those special descriptions can only have the RDF:ID attribute or be anonymous, they
cannot have the RDF:about.
The Membership properties are not been used as is, but instead the element RDF:li is
used; the parser has to replace it by appropriate numbered property. Figure given below
is an example of it.
Instead of the RDF:about, descriptions can also have the attribute RDF:aboutEach or
the RDF:aboutEachPrefix. This allows to distribute the description over the set of
RDF:aboutEach's value should be a container's URI; the corresponding description
applies to every member of a container.
RDF:aboutEachPrefix's value is the string; corresponding description applies to
any of the resource whose URI starts with this string.
The Implementations of the RDF are not bound only to keep the information about those
distributive descriptions - this is only the syntactic shortcut. It may result in the
unexpected behaviours of some agents, as soon as more than one RDF source is been
involved (resources defined in the source can match the distributed description in
another one, but not been detected as such).
Moreover, it is not been specified whether the distributed description may be embedded
as the property values. Though this possibility is never been mentioned, the formal
syntax allows it. The natural interpretation would be that the property is valued by
every resource matching an distributed description.
XML syntax of the RDF provides a way to reify the asserted statements: the single arc can
be reified by adding the RDF:ID attribute to an property element, which will define
the URI of a reified statement. On the other hand, every arc generated by the
description can be reified by adding the RDF:bagID attribute to Description.
This defines an URI of the new bag resource, whose members are a reified statements.