Another abandoned server code base... this is kind of an ancestor of taskrambler.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

3984 lines
189 KiB

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta name="rcsid" content="$Id: Overview.html,v 1.3 2003/01/24 17:43:08 em Exp $"/>
<title>RDF/XML Syntax Specification (Revised)</title>
<style type="text/css">
.added {
color: green;
text-decoration: underline;
background: white;
}
.removed {
color: red;
background: white;
text-decoration: line-through;
}
.actionLabel {
font-weight: bold
}
.actionDecision {
color: black;
background: #99ffff;
}
div.issue,
div.block,
div.note { margin-left: 2em; }
div.productionOuter {
margin: 0em;
padding: 0em;
}
div.productionInner {
color: black;
/* tan */
/* background-color: #d2b48c; */
/* cyan */
/* background-color: #99ffff; */
/* mauve */
background-color: #efeff8;
padding: 0.5em;
margin: 0em;
}
div.productionInner p {
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em
}
div.ntripleOuter {
margin: 0em;
padding: 0em;
}
div.ntripleInner {
color: black;
/* LightGoldenrod1 */
background-color: #ffec8b;
padding: 0.5em;
margin: 0em;
}
div.ntripleInner p {
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em
}
div.exampleOuter {
border: 4px double gray;
margin: 0em;
padding: 0em;
}
div.exampleInner {
color: black;
/* mauve */
background-color: #efeff8;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-width: 4px;
border-bottom-style: double;
border-bottom-color: #d3d3d3;
padding: 4px;
margin: 0em;
}
div.exampleInner pre {
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em;
font-family: monospace;
/* font-size: smaller */
}
div.preExample {
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em;
font-family: monospace;
/* font-size: smaller */
}
span.nodeStripe {
color: #ff0000;
}
span.termdef {
color: #850021;
}
a.termref:visited, a.termref:link {
font-family: sans-serif;
font-style: normal;
color: black;
text-decoration: none
}
span.arrow {
font-style: normal;
font-weight: bold
}
.figure {
font-weight: bold;
text-align: center;
}
</style>
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WD" />
</head>
<body>
<div class="head">
<a href="http://www.w3.org/"><img height="48"
width="72" alt="W3C" src="http://www.w3.org/Icons/w3c_home" /></a>
<h1 id="title">RDF/XML Syntax Specification (Revised)</h1>
<h2 id="doctype">W3C Working Draft 23 January 2003</h2>
<dl>
<dt>This version:</dt>
<dd><a href="http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20030123">http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20030123</a>
</dd>
<dt>Latest Version:</dt>
<dd><a href="http://www.w3.org/TR/rdf-syntax-grammar">http://www.w3.org/TR/rdf-syntax-grammar</a><br />
</dd>
<dt>Previous Version:</dt>
<dd><a href="http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108">http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108</a><br />
</dd>
<dt>Editor:</dt>
<dd><a href="http://purl.org/net/dajobe/">Dave Beckett</a> (University of Bristol)</dd>
<dt>Series editor:</dt>
<dd><a href="http://www-uk.hpl.hp.com/people/bwm/">Brian McBride</a> (Hewlett Packard Labs)</dd>
</dl>
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"> Copyright</a> &#xa9; 2003 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>&#xae;</sup> (<a href="http://www.lcs.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>, <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a> rules apply.</p>
<hr title="Separator for header" />
</div>
<h2 class="nonum">
<a id="abstract" name="abstract">Abstract</a>
</h2>
<p>The Resource Description Framework
(<abbr title="Resource Description Framework">RDF</abbr>) is a
general-purpose language for representing information in the Web.</p>
<p>This document defines an
<a href="http://www.w3.org/TR/2000/REC-xml-20001006">XML</a>
syntax for RDF called RDF/XML in terms of
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">XML Namespaces</a>,
the
<a href="http://www.w3.org/TR/2001/REC-xml-infoset-20011024/">XML Information Set</a>
and <a href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML Base</a>.
The <a href="#section-Infoset-Grammar">formal grammar</a> for the syntax
is annotated with actions generating triples of the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-graph">RDF Graph</a>
as defined in
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/">RDF Concepts and Abstract Syntax</a>.
This is done using the
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/#ntriples">N-Triples</a>
RDF Graph serializing format which enables more precise recording of
the mapping in a machine processable form. The mappings are
recorded as tests cases, gathered and published in
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/">RDF Test Cases</a>.</p>
<h2 class="nonum">
<a id="status" name="status">Status of this Document</a>
</h2>
<p>This is a W3C
<a href="http://www.w3.org/Consortium/Process-20010719/tr.html#last-call">Last Call Working Draft</a>
of the <a href="http://www.w3.org/2001/sw/RDFCore/">RDF Core Working Group</a>
and has been produced as part of the W3C
<a href="http://www.w3.org/2001/sw/">Semantic Web Activity</a>
(<a href="http://www.w3.org/2001/sw/Activity">Activity Statement</a>).</p>
<p>This document is in the Last Call review period, which ends on
21 February 2003. This document has been endorsed by the RDF
Core Working Group.</p>
<p>This document revises RDF/XML from the original definition in the
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#grammar">grammar section</a> of
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">RDF Model &amp; Syntax</a> <a href="#ref-rdfms">[RDF-MS]</a> W3C Recommendation
after decisions made by the
<a href="http://www.w3.org/2001/sw/RDFCore/">RDF Core Working Group</a>.
In particular, the <a href="#section-Infoset-Grammar">formal grammar</a>
is now in terms of the
<a href="http://www.w3.org/TR/2001/REC-xml-infoset-20011024/">XML Information Set</a>
<a href="#ref-xml-infoset">[INFOSET]</a>.
</p>
<p>In this revision, new support was added for
<a href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML Base</a> <a href="#ref-xml-base">[XML-BASE]</a>,
RDF Datatyping with <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-typed-literal">Typed Literals</a> using <code>rdf:datatype</code>,
<code>rdf:nodeID</code> to allow referencing of <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node">Blank Nodes</a> and
<code>rdf:parseType="Collection"</code> for expressing a collection of
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-node">Nodes</a>.
The revision removed
<code>rdf:aboutEach</code> and <code>rdf:aboutEachPrefix</code> from
the syntax
(see RDF Core issues <a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-aboutEach-on-object">rdfms-aboutEach-on-object</a> and
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-abouteachprefix">rdfms-abouteachprefix</a>).
</p>
<p>The detailed changes from the previous
<a href="http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/">8 November 2002 working draft</a>
are described in the <a href="#section-Changes">Changes section</a>.</p>
<p>This document is being released for review by W3C Members and
other interested parties to encourage feedback and comments,
especially with regard to how the changes made affect existing
implementations and content.</p>
<p>In conformance with
<a href="http://www.w3.org/Consortium/Process-20010719/#ipr">W3C policy</a>
requirements, known patent and
<acronym title="Intellectual Property Rights">IPR</acronym>
constraints associated with this Working Draft are detailed on the
<a href="http://www.w3.org/2001/sw/RDFCore/ipr-statements" rel="disclosure">RDF Core Working Group Patent Disclosure</a> page.</p>
<p>Comments on this document are invited and should be sent to the
public mailing list
<a href="mailto:www-rdf-comments@w3.org">www-rdf-comments@w3.org</a>.
An archive of comments is available at
<a href="http://lists.w3.org/Archives/Public/www-rdf-comments/">http://lists.w3.org/Archives/Public/www-rdf-comments/</a>.
</p>
<p>This is a public W3C Last Call Working Draft for review by W3C
Members and other interested parties. This section describes the
status of this document at the time of its publication. It is a draft
document and may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to use W3C Working Drafts
as reference material or to cite as other than "work in progress". A
list of current W3C Recommendations and other technical documents can
be found at <a href="/TR/">http://www.w3.org/TR/</a>.
</p>
<div class="toc">
<h2 class="nonum">
<a id="contents" name="contents">Table of contents</a>
</h2>
<p class="toc">
1 <a href="#section-Introduction">Introduction</a><br />
2 <a href="#section-Syntax">An XML syntax for RDF</a><br />
&#160;&#160;2.1 <a href="#section-Syntax-intro">Introduction</a><br />
&#160;&#160;2.2 <a href="#section-Syntax-node-property-elements">Node Elements and Property Elements</a><br />
&#160;&#160;2.3 <a href="#section-Syntax-multiple-property-elements">Multiple Property Elements</a><br />
&#160;&#160;2.4 <a href="#section-Syntax-empty-property-elements">Empty Property Elements</a><br />
&#160;&#160;2.5 <a href="#section-Syntax-property-attributes">Property Attributes</a><br />
&#160;&#160;2.6 <a href="#section-Syntax-complete-document">Completing the Document - Document Element and XML Declaration</a><br />
&#160;&#160;2.7 <a href="#section-Syntax-languages">Languages - <code>xml:lang</code></a><br />
&#160;&#160;2.8 <a href="#section-Syntax-XML-literals">XML Literals - <code>rdf:parseType="Literal"</code></a><br />
&#160;&#160;2.9 <a href="#section-Syntax-datatyped-literals">Typed Literals - <code>rdf:datatype</code></a><br />
&#160;&#160;2.10 <a href="#section-Syntax-blank-nodes">Identifying Blank Nodes - <code>rdf:nodeID</code></a><br />
&#160;&#160;2.11 <a href="#section-Syntax-parsetype-resource">Omitting Blank Nodes - <code>rdf:parseType="Resource"</code></a><br />
&#160;&#160;2.12 <a href="#section-Syntax-property-attributes-on-property-element">Omitting Nodes - Property Attributes on an empty Property Element</a><br />
&#160;&#160;2.13 <a href="#section-Syntax-typed-nodes">Typed Node Elements</a><br />
&#160;&#160;2.14 <a href="#section-Syntax-ID-xml-base">Abbreviating URI References - <code>rdf:ID</code> and <code>xml:base</code></a><br />
&#160;&#160;2.15 <a href="#section-Syntax-list-elements">Container membership property elements - <code>rdf:li</code> and <code>rdf:_</code><em>n</em></a><br />
&#160;&#160;2.16 <a href="#section-Syntax-parsetype-Collection">Collections - <code>rdf:parseType="Collection"</code></a><br />
&#160;&#160;2.17 <a href="#section-Syntax-reifying">Reifying Statements - <code>rdf:bagID</code> and <code>rdf:ID</code></a><br />
&#160;&#160;2.18 <a href="#section-Syntax-more">More Information</a><br />
3 <a href="#section-Terminology">Terminology</a><br />
4 <a href="#section-MIME-Type">RDF MIME type, file extension and Macintosh file type</a><br />
5 <a href="#section-Global">Global Issues</a><br />
&#160;&#160;5.1 <a href="#section-Namespace">The RDF Namespace</a><br />
&#160;&#160;5.2 <a href="#section-Identifiers">Identifiers</a><br />
&#160;&#160;5.3 <a href="#section-baseURIs">Resolving URIs</a><br />
&#160;&#160;5.4 <a href="#section-constraints">Constraints</a><br />
6 <a href="#section-Data-Model">Syntax Data Model</a><br />
&#160;&#160;6.1 <a href="#section-Nodes">Events</a><br />
&#160;&#160;6.2 <a href="#section-Infoset-Mapping">Information Set Mapping</a><br />
&#160;&#160;6.3 <a href="#section-Infoset-Grammar-Notation">Grammar Notation</a><br />
7 <a href="#section-Infoset-Grammar">RDF/XML Grammar</a><br />
&#160;&#160;7.1 <a href="#section-grammar-summary">Grammar Summary</a><br />
&#160;&#160;7.2 <a href="#section-grammar-productions">Grammar Productions</a><br />
&#160;&#160;7.3 <a href="#section-Reification">Reification Rules</a><br />
&#160;&#160;7.4 <a href="#section-List-Expand">List Expansion Rules</a><br />
&#160;&#160;7.5 <a href="#section-Bag-Expand">Bag Expansion Rules</a><br />
8 <a href="#section-Serialising">Serializing an RDF Graph to RDF/XML</a><br />
9 <a href="#section-rdf-in-HTML">RDF/XML in HTML</a><br />
10 <a href="#section-Acknowledgments">Acknowledgments</a><br />
11 <a href="#section-References">References</a></p>
<h3><a id="section-Appendices-TOC" name="section-Appendices-TOC">Appendices</a></h3>
<p class="toc">
A <a href="#section-Schemas">Syntax Schemas</a> (Informative)<br />
&#160;&#160;A.1 <a href="#section-RELAXNG-Schema">RELAX&#160;NG Compact Syntax Schema</a> (Informative)<br />
B <a href="#section-Changes">Changes</a> (Informative)
</p>
</div>
<hr />
<h2>
<a id="section-Introduction" name="section-Introduction">1 Introduction</a>
</h2>
<p>This document defines the
<a href="http://www.w3.org/TR/2000/REC-xml-20001006">XML</a>
<a href="#ref-xml">[XML]</a>
syntax for RDF Graphs
which was originally defined in the
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">RDF Model &amp; Syntax</a> <a href="#ref-rdfms">[RDF-MS]</a> W3C
Recommendation. Subsequent implementations of this syntax and
comparison of the resulting RDF Graphs have shown that there was
ambiguity - implementations generated different graphs and certain
syntax forms were not widely implemented.</p>
<p>The
<a href="http://www.w3.org/2001/sw/RDFCore/">RDF Core Working Group</a>
is <a href="http://www.w3.org/2001/sw/RDFCoreWGCharter">chartered</a>
to respond to the need for a number of fixes, clarifications and
improvements to the specification of RDF's abstract graph and XML
syntax as recorded in the
<a href="http://www.w3.org/2000/03/rdf-tracking/">RDF Core Working Group issues list</a>.
The Working Group invites feedback from the developer
community on the effects of its proposals on existing implementations
and documents.</p>
<p>This document revises the
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#grammar">original RDF/XML grammar</a>
in terms of
<a href="http://www.w3.org/TR/2001/REC-xml-infoset-20011024/">XML Information Set</a>
<a href="#ref-xml-infoset">[INFOSET]</a> Information Items which moves
away from the rather low-level details of XML, such as particular
forms of empty elements. This allows the grammar to be more
precisely recorded and the mapping from the XML syntax to the RDF
Graph more clearly shown. The mapping to the RDF Graph is done by
emitting statements in the form defined in the
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/#ntriples">N-Triples</a>
section of
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/">RDF Test Cases</a> <a href="#ref-test-cases">[RDF-TESTS]</a> Working Draft
which creates an RDF Graph, that has semantics defined by
<a href="http://www.w3.org/TR/2003/WD-rdf-mt-20030123/">RDF Semantics</a> <a href="#ref-rdf-model">[RDF-SEMANTICS]</a> Working Draft.
</p>
<p>The complete specification of RDF consists of a number of documents:</p>
<ul>
<li><a href="http://www.w3.org/TR/2003/WD-rdf-primer-20030123/">RDF Primer</a> <a href="#ref-rdfprimer">[RDF-PRIMER]</a></li>
<li><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/">RDF Concepts and Abstract Syntax</a> <a href="#ref-rdfconcepts">[RDF-CONCEPTS]</a></li>
<li><a href="http://www.w3.org/TR/2003/WD-rdf-mt-20030123/">RDF Semantics</a> <a href="#ref-rdf-model">[RDF-SEMANTICS]</a></li>
<li><a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML syntax</a> (this document)</li>
<li><a href="http://www.w3.org/TR/2003/WD-rdf-schema-20030123/">RDF Vocabulary Description Language 1.0: RDF Schema</a> <a href="#ref-rdfvocab">[RDF-VOCABULARY]</a></li>
<li><a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/">RDF Test Cases</a> <a href="#ref-test-cases">[RDF-TESTS]</a></li>
</ul>
<h2>
<a id="section-Syntax" name="section-Syntax">2 An XML syntax for RDF</a>
</h2>
<p>This section introduces the RDF/XML syntax, describes how it
encodes RDF Graphs and explains this with examples. If there is any
conflict between this informal description and the formal description
of the syntax and grammar in sections
<a href="#section-Data-Model">6 Syntax Data Model</a> and
<a href="#section-Infoset-Grammar">7 RDF/XML Grammar</a>, the
latter two sections take precedence.
</p>
<h3><a id="section-Syntax-intro" name="section-Syntax-intro">2.1 Introduction</a></h3>
<p>The
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/">RDF Concepts and Abstract Syntax</a> <a href="#ref-rdfconcepts">[RDF-CONCEPTS]</a> working draft
defines the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#section-data-model">RDF Graph data model</a> (Section 3.1)
and the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-graph">RDF Graph syntax</a> (Section 6.2).
Along with the
<a href="http://www.w3.org/TR/2003/WD-rdf-mt-20030123/">RDF Semantics</a> <a href="#ref-rdf-model">[RDF-SEMANTICS]</a> working draft
this provides an abstract syntax with a formal semantics for it.
The RDF Graph has
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-node">Nodes</a>
and labeled directed <em>Arcs</em>
that link pairs of Nodes and this is represented as a set of
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-triple">RDF triples</a>
where each triple contains a
<em>Subject Node</em>, <em>Property Arc</em> and <em>Object Node</em>.
Nodes are
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>,
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-literal">RDF Literals</a>
or are <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node">Blank Nodes</a>.
Blank Nodes may be given
a document-local, non-<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a> identifier called a
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node-id">Blank Node Identifier</a>.
<em>Arcs</em> are labeled with
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>.
The property arc can be interpreted as either a relationship between
two nodes or as defining an attribute value (object node) for some
subject node.</p>
<p>In order to encode the graph in XML, the nodes and arcs have to be
represented by XML element names, attribute names, element content
and attribute content.
RDF/XML uses XML
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName">QNames</a> to represent
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>.
The
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-Prefix">namespace prefix</a>
part of all QNames is associated with a URI Reference as defined in
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">XML Namespaces</a> <a href="#ref-namespaces">[XML-NS]</a>.
The
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
represented by a QName is determined by appending the
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-LocalPart">local name</a>
part of the QName to the
URI Reference associated with the namespace prefix part of the QName.
This is used to shorten the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
of all property arcs labels and some nodes.
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a> identifying
subject and object nodes can also be stored as XML attribute values
or XML element names via QNames.
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-literal">RDF Literals</a>
(which are only object nodes)
become either XML element text content or XML attribute values.</p>
<p>A graph can be considered a collection of paths of the form Node,
Arc, Node, Arc, Node, Arc, ... Node which cover the entire graph. In
RDF/XML these turn into sequences of elements inside elements which
alternate between elements for Nodes and Arcs. This has been called
a series of Node/Arc stripes. The Node at the start of the sequence
turns into the outermost element, the next arc turns into a child
element, and so on. The stripes generally start at the top of an
RDF/XML document and always begin with nodes.
</p>
<p>Several RDF/XML examples are given in the following sections
building up to complete RDF/XML documents. <a href="#example7">Example 7</a>
is the first complete RDF/XML document.</p>
<h3><a id="section-Syntax-node-property-elements" name="section-Syntax-node-property-elements">2.2 Node Elements and Property Elements</a></h3>
<div class="figure">
<img src="figure1.png" alt="Graph for RDF/XML Example" height="202" width="600" /><br />
<a id="figure1" name="figure1">Figure 1: Graph for RDF/XML Example</a> (<a href="figure1.svg">SVG version</a>)
</div>
<p>An RDF Graph is given in <a href="#figure1">Figure 1</a>
where the nodes are represented as ovals and contain their
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
where they have them, all the arcs are labeled with
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
and
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-plain-literal">Plain Literal</a>
nodes have been written in rectangles.</p>
<p>If we follow one Node, Arc ... , Node path through the graph shown in
<a href="#figure2">Figure 2</a>:
</p>
<div class="figure">
<img src="figure2.png" alt="One Path Through the Graph" height="212" width="600" /><br />
<a id="figure2" name="figure2">Figure 2: One Path Through the Graph</a> (<a href="figure2.svg">SVG version</a>)
</div>
<p>This corresponds to the Node/Arc stripes:</p>
<ol>
<li>Node with <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> <code>http://www.w3.org/TR/rdf-syntax-grammar</code></li>
<li>Arc labeled with <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> <code>http://example.org/terms/editor</code></li>
<li>Node with no <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a></li>
<li>Arc labeled with <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> <code>http://example.org/terms/homePage</code></li>
<li>Node with <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> <code>http://purl.org/net/dajobe/</code></li>
</ol>
<p>In RDF/XML, the sequence of 5 nodes and arcs in
<a href="#figure2">Figure 2</a> corresponds to
the usage of 5 XML elements of two types, for the graph nodes and
arcs. These are conventionally called <em>Node Elements</em> and
<em>Property Elements</em> respectively. In the striping shown in
<a href="#example1">Example 1</a>, <code>rdf:Description</code> is the
node element (used 3 times for the three nodes) and
<code>ex:editor</code> and <code>ex:homePage</code> are the 2
property elements.
</p>
<div class="exampleOuter">
<div style="align:center"><a id="example1" name="example1">Example 1: Striped RDF/XML (<span class="nodeStripe">nodes</span> and <span class="arcStripe">arcs</span>)</a></div>
<div class="exampleInner">
<div class="preExample">
<code>
<span class="nodeStripe">&lt;rdf:Description&gt;</span><br />
&nbsp;&nbsp;<span class="arcStripe">&lt;ex:editor&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span class="nodeStripe">&lt;rdf:Description&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arcStripe">&lt;ex:homePage&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nodeStripe">&lt;rdf:Description&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nodeStripe">&lt;/rdf:Description&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="arcStripe">&lt;/ex:homePage&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span class="nodeStripe">&lt;/rdf:Description&gt;</span><br />
&nbsp;&nbsp;<span class="arcStripe">&lt;/ex:editor&gt;</span><br />
<span class="nodeStripe">&lt;/rdf:Description&gt;</span><br />
</code>
</div>
</div>
</div>
<p>The <a href="#figure2">Figure 2</a> graph consists of some nodes
that are
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
(and others that are not) and this can be added
to the RDF/XML using the <code>rdf:about</code> attribute on node
elements to give the result in <a href="#example2">Example 2</a>:</p>
<div class="exampleOuter">
<div style="align:center"><a id="example2" name="example2">Example 2: Node Elements with RDF URI References added</a></div>
<div class="exampleInner">
<pre>
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
&lt;ex:editor&gt;
&lt;rdf:Description&gt;
&lt;ex:homePage&gt;
&lt;rdf:Description rdf:about="http://purl.org/net/dajobe/"&gt;
&lt;/rdf:Description&gt;
&lt;/ex:homePage&gt;
&lt;/rdf:Description&gt;
&lt;/ex:editor&gt;
&lt;/rdf:Description&gt;
</pre>
</div>
</div>
<p>Adding the other two paths through the <a href="#figure1">Figure 1</a>
graph to the RDF/XML in
<a href="#example2">Example 2</a>
gives the result in <a href="#example3">Example 3</a>
(this example fails to show that the blank node is
shared between the two paths, see
<a href="#section-Syntax-blank-nodes">2.10</a>):</p>
<div class="exampleOuter">
<div style="align:center"><a id="example3" name="example3">Example 3: Complete description of all graph paths</a></div>
<div class="exampleInner">
<pre>
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
&lt;ex:editor&gt;
&lt;rdf:Description&gt;
&lt;ex:homePage&gt;
&lt;rdf:Description rdf:about="http://purl.org/net/dajobe/"&gt;
&lt;/rdf:Description&gt;
&lt;/ex:homePage&gt;
&lt;/rdf:Description&gt;
&lt;/ex:editor&gt;
&lt;/rdf:Description&gt;
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
&lt;ex:editor&gt;
&lt;rdf:Description&gt;
&lt;ex:fullName&gt;Dave Beckett&lt;/ex:fullName&gt;
&lt;/rdf:Description&gt;
&lt;/ex:editor&gt;
&lt;/rdf:Description&gt;
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
&lt;dc:title&gt;RDF/XML Syntax Specification (Revised)&lt;/dc:title&gt;
&lt;/rdf:Description&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-multiple-property-elements" name="section-Syntax-multiple-property-elements">2.3 Multiple Property Elements</a></h3>
<p>There are several abbreviations that can be used to make common
uses easier to write down. In particular, it is common that a
subject node in the RDF Graph has multiple outgoing arcs. RDF/XML
provides an abbreviation for the corresponding syntax when a node
element about a resource has multiple property elements. This can be
abbreviated by using multiple child property elements inside the node
element describing the subject node.</p>
<p>Taking <a href="#example3">Example 3</a>, there are
two node elements that can take multiple property elements.
The subject node with URI Reference
<code>http://www.w3.org/TR/rdf-syntax-grammar</code>
has property elements <code>ex:editor</code> and <code>ex:title</code>
and the node element for the blank node can take <code>ex:homePage</code>
and <code>ex:fullName</code>. This abbreviation
gives the result shown in <a href="#example4">Example 4</a>
(this example does show that there is a single blank node):</p>
<div class="exampleOuter">
<div style="align:center"><a id="example4" name="example4">Example 4: Using multiple property elements on a node element</a></div>
<div class="exampleInner">
<pre>
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
&lt;ex:editor&gt;
&lt;rdf:Description&gt;
&lt;ex:homePage&gt;
&lt;rdf:Description rdf:about="http://purl.org/net/dajobe/"&gt;
&lt;/rdf:Description&gt;
&lt;/ex:homePage&gt;
&lt;ex:fullName&gt;Dave Beckett&lt;/ex:fullName&gt;
&lt;/rdf:Description&gt;
&lt;/ex:editor&gt;
&lt;dc:title&gt;RDF/XML Syntax Specification (Revised)&lt;/dc:title&gt;
&lt;/rdf:Description&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-empty-property-elements" name="section-Syntax-empty-property-elements">2.4 Empty Property Elements</a></h3>
<p>When an arc in an RDF Graph points to an object node which has no
further arcs, which appears in RDF/XML as an empty node element
sequence such as the pair
<code>&lt;rdf:Description rdf:about="..."&gt;</code>
<code>&lt;/rdf:Description&gt;</code>, this
form can be shortened. This is done by using the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
of the object node as the value of an XML attribute <code>rdf:resource</code>
on the containing property element and making the property element empty.
</p>
<p>In this example, the property element <code>ex:homePage</code>
contains an empty node element with the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
<code>http://purl.org/net/dajobe/</code>. This can be replaced with
the empty property element form giving the result shown in
<a href="#example5">Example 5</a>:</p>
<div class="exampleOuter">
<div style="align:center"><a id="example5" name="example5">Example 5: Empty property elements</a></div>
<div class="exampleInner">
<pre>
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
&lt;ex:editor&gt;
&lt;rdf:Description&gt;
&lt;ex:homePage rdf:resource="http://purl.org/net/dajobe/"/&gt;
&lt;ex:fullName&gt;Dave Beckett&lt;/ex:fullName&gt;
&lt;/rdf:Description&gt;
&lt;/ex:editor&gt;
&lt;dc:title&gt;RDF/XML Syntax Specification (Revised)&lt;/dc:title&gt;
&lt;/rdf:Description&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-property-attributes" name="section-Syntax-property-attributes">2.5 Property Attributes</a></h3>
<p>When a property element's content is string literal,
it may be possible to use it as an XML attribute on the
containing node element.
This can be done for multiple properties on the same node element
only if the property element name is not repeated
(required by XML - attribute names are unique on an XML element)
and any in-scope <code>xml:lang</code> on the
property element's string literal (if any) are the same (see <a href="#section-Syntax-languages">Section 2.7</a>)
This abbreviation is known as a <em>Property Attribute</em>
and can be applied to any node element or with the
<code>rdf:parseType="Resource"</code> form
(see <a href="#section-Syntax-parsetype-resource">Section 2.11</a>).</p>
<p>This abbreviation can also be used when the property element is
<code>rdf:type</code> and it has an <code>rdf:resource</code> attribute
the value of which is interpreted as a
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> object node.</p>
<p>In <a href="#example5">Example 5</a>:,
there are two property elements with string literal content,
the <code>dc:title</code> and <code>ex:fullName</code>
property elements. These can be replaced with property attributes
giving the result shown in <a href="#example6">Example 6</a>:</p>
<div class="exampleOuter">
<div style="align:center"><a id="example6" name="example6">Example 6: Replacing property elements with string literal content into property attributes</a></div>
<div class="exampleInner">
<pre>
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
dc:title="RDF/XML Syntax Specification (Revised)"&gt;
&lt;ex:editor&gt;
&lt;rdf:Description ex:fullName="Dave Beckett"&gt;
&lt;ex:homePage rdf:resource="http://purl.org/net/dajobe/"/&gt;
&lt;/rdf:Description&gt;
&lt;/ex:editor&gt;
&lt;/rdf:Description&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-complete-document" name="section-Syntax-complete-document">2.6 Completing the Document - Document Element and XML Declaration</a></h3>
<p>To create a complete RDF/XML document, the serialization of the
graph into XML must be contained inside an <code>rdf:RDF</code> XML
element which becomes the top-level XML document element.
Conventionally the <code>rdf:RDF</code> element is also used to
declare the XML namespaces that are used, although that is not
required. The XML specification also permits an XML declaration at
the top of the document with the XML version and possibly the XML
content encoding (this is optional but recommended).</p>
<p>This could be done for any of the correct complete graph examples from
<a href="#example4">Example 4</a> onwards but taking the smallest
<a href="#example6">Example 6</a> and adding the final components,
gives a complete RDF/XML representation of the original
<a href="#figure1">Figure 1</a> graph
in <a href="#example7">Example 7</a>:</p>
<div class="exampleOuter">
<div style="align:center"><a id="example7" name="example7">Example 7: Complete RDF/XML description of Figure 1 graph</a> (<a href="example07.rdf">example07.rdf</a> output <a href="example07.nt">example07.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
dc:title="RDF/XML Syntax Specification (Revised)"&gt;
&lt;ex:editor&gt;
&lt;rdf:Description ex:fullName="Dave Beckett"&gt;
&lt;ex:homePage rdf:resource="http://purl.org/net/dajobe/" /&gt;
&lt;/rdf:Description&gt;
&lt;/ex:editor&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-languages" name="section-Syntax-languages">2.7 Languages - <code>xml:lang</code></a></h3>
<p>RDF/XML permits the use of the <code>xml:lang</code> attribute as defined by
<a href="http://www.w3.org/TR/REC-xml#sec-lang-tag">2.12 Language Identification</a>
of <a href="http://www.w3.org/TR/2000/REC-xml-20001006">XML 1.0</a> <a href="#ref-xml">[XML]</a>
to allow the identification of content language.
This can be used on any node element or property element
to indicate that the included content is
in the given language. The most specific in-scope language present
(if any) is applied to property element string literal content or
property attribute values. The <code>xml:lang=""</code> form
indicates the absence of a language identifier.</p>
<p>Some examples of marking content languages for RDF properties are shown in
<a href="#example8">Example 8</a>:</p>
<div class="exampleOuter">
<div style="align:center"><a id="example8" name="example8">Example 8: Complete example of <code>xml:lang</code></a> (<a href="example08.rdf">example08.rdf</a> output <a href="example08.nt">example08.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
&lt;dc:title&gt;RDF/XML Syntax Specification (Revised)&lt;/dc:title&gt;
&lt;dc:title xml:lang="en"&gt;RDF/XML Syntax Specification (Revised)&lt;/dc:title&gt;
&lt;dc:title xml:lang="en-US"&gt;RDF/XML Syntax Specification (Revised)&lt;/dc:title&gt;
&lt;/rdf:Description&gt;
&lt;rdf:Description rdf:about="http://example.org/buchen/baum" xml:lang="de"&gt;
&lt;dc:title&gt;Das Baum&lt;/dc:title&gt;
&lt;dc:description&gt;Das Buch ist außergewöhnlich&lt;/dc:description&gt;
&lt;dc:title xml:lang="en"&gt;The Tree&lt;/dc:title&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-XML-literals" name="section-Syntax-XML-literals">2.8 XML Literals - <code>rdf:parseType="Literal"</code></a></h3>
<p>RDF allows
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-XMLLiteral">XML Literals</a>
(<a href="#ref-rdfconcepts">[RDF-CONCEPTS]</a> Section 5, <cite>XML Content within an RDF Graph</cite>)
to be given as the object node of arcs.
These are written in RDF/XML as content of a property element (not
a property attribute) and indicated using the
<code>rdf:parseType="Literal"</code> attribute on the containing
property element.
</p>
<p>An example of writing an XML literal is given in
<a href="#example9">Example 9</a> where
there is a single RDF triple with the subject node
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
<code>http://example.org/item01</code>, the arc label
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
<code>http://example.org/stuff/1.0/prop</code> (from
<code>ex:prop</code>) and the object node with XML Literal
content beginning <code>a:Box</code>
</p>
<div class="exampleOuter">
<div style="align:center"><a id="example9" name="example9">Example 9: Complete example of <code>rdf:parseType="Literal"</code></a> (<a href="example09.rdf">example09.rdf</a> output <a href="example09.nt">example09.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;rdf:Description rdf:about="http://example.org/item01"&gt;
&lt;ex:prop rdf:parseType="Literal"
xmlns:a="http://example.org/a#"&gt;&lt;a:Box required="true"&gt;
&lt;a:widget size="10" /&gt;
&lt;a:grommit id="23" /&gt;&lt;/a:Box&gt;
&lt;/ex:prop&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-datatyped-literals" name="section-Syntax-datatyped-literals">2.9 Typed Literals - <code>rdf:datatype</code></a></h3>
<p>RDF allows
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-typed-literal">Typed Literals</a>
to be given as the object node of arcs. These consist of a literal
string (with optional language) and a datatype
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>. This is handled by using the same syntax for
literal string nodes in the property element form (not property
attribute) but with an additional
<code>rdf:datatype="</code><em>datatypeURI</em><code>"</code>
attribute on the property element. Any
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> can be used in the attribute.
</p>
<p>An example of an RDF
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-typed-literal">Typed Literal</a>
is given in <a href="#example10">Example 10</a> where
there is a single RDF triple with the subject node
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
<code>http://example.org/item01</code>, the arc label
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
<code>http://example.org/stuff/1.0/size</code> (from
<code>ex:size</code>) and the object node with the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-typed-literal">Typed Literal</a>
("123", <code>http://www.w3.org/2001/XMLSchema#int</code>, no language <code>xml:lang=""</code>)
intending to be interpreted as a
<a href="http://www.w3.org/TR/xmlschema-2/#int">W3C XML Schema datatype int</a>.
</p>
<div class="exampleOuter">
<div style="align:center"><a id="example10" name="example10">Example 10: Complete example of <code>rdf:datatype</code></a> (<a href="example10.rdf">example10.rdf</a> output <a href="example10.nt">example10.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;rdf:Description rdf:about="http://example.org/item01"&gt;
&lt;ex:size rdf:datatype="http://www.w3.org/2001/XMLSchema#int"&gt;123&lt;/ex:size&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-blank-nodes" name="section-Syntax-blank-nodes">2.10 Identifying Blank Nodes - <code>rdf:nodeID</code></a></h3>
<p><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node">Blank Nodes</a> in the RDF Graph are distinct but have no
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> identifier.
It is sometimes required that the same graph <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node">Blank Node</a> is referred to in the
RDF/XML in multiple places, such as at the subject and object
of several RDF triples. In this case, a <em><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node-id">Blank Node Identifier</a></em>
can be given to the <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node">Blank Node</a> for identifying it
in the document. Blank node identifiers in RDF/XML are scoped to the
XML Information Set
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.document">Document Information Item</a>.
A <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node-id">Blank Node Identifier</a> is used
on a node element to replace
<code>rdf:about="</code><em>RDF URI Reference</em><code>"</code>
or on a property element to replace
<code>rdf:resource="</code><em>RDF URI Reference</em><code>"</code>
with <code>rdf:nodeID="</code><em><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node-id">Blank Node Identifier</a></em><code>"</code>
in both cases.</p>
<p>Taking <a href="#example7">Example 7</a> and explicitly giving
a <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node-id">Blank Node Identifier</a> of <code>abc</code> to the blank node in it
gives the result shown in <a href="#example11">Example 11</a>.
The second <code>rdf:Description</code> property element is
about the blank node.</p>
<div class="exampleOuter">
<div style="align:center"><a id="example11" name="example11">Example 11: Complete RDF/XML description of graph using <code>rdf:nodeID</code> identifying the blank node</a> (<a href="example11.rdf">example11.rdf</a> output <a href="example11.nt">example11.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
dc:title="RDF/XML Syntax Specification (Revised)"&gt;
&lt;ex:editor rdf:nodeID="abc"/&gt;
&lt;/rdf:Description&gt;
&lt;rdf:Description rdf:nodeID="abc"
ex:fullName="Dave Beckett"&gt;
&lt;ex:homePage rdf:resource="http://purl.org/net/dajobe/"/&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-parsetype-resource" name="section-Syntax-parsetype-resource">2.11 Omitting Blank Nodes - <code>rdf:parseType="Resource"</code></a></h3>
<p><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node">Blank Nodes</a> (not <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> nodes) in RDF Graphs can be written
in a form that allows the
<code>&lt;rdf:Description&gt;</code>
<code>&lt;/rdf:Description&gt;</code> pair to be omitted.
This can be done by putting an
<code>rdf:parseType="Resource"</code>
attribute on the containing property element
that turns the property element into a property and node element,
which can itself have both property elements and property attributes.
Property attributes and the <code>rdf:nodeID</code> attribute
are not permitted on such property elements.
</p>
<p>Taking the earlier <a href="#example7">Example 7</a>,
the contents of the <code>ex:editor</code> property element
could be alternatively done in this fashion to give
the form shown in <a href="#example12">Example 12</a>:</p>
<div class="exampleOuter">
<div style="align:center"><a id="example12" name="example12">Example 12: Complete example using <code>rdf:parseType="Resource"</code></a> (<a href="example12.rdf">example12.rdf</a> output <a href="example12.nt">example12.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
dc:title="RDF/XML Syntax Specification (Revised)"&gt;
&lt;ex:editor rdf:parseType="Resource"&gt;
&lt;ex:fullName&gt;Dave Beckett&lt;/ex:fullName&gt;
&lt;ex:homePage rdf:resource="http://purl.org/net/dajobe/"/&gt;
&lt;/ex:editor&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-property-attributes-on-property-element" name="section-Syntax-property-attributes-on-property-element">2.12 Omitting Nodes - Property Attributes on an empty Property Element</a></h3>
<p>If all of the property elements on a blank node element have
string literal values with the same in-scope <code>xml:lang</code>
value (if present) and each of these property elements appears at
most once and there is at most one <code>rdf:type</code> property
element with a <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> object node, these can be abbreviated by
moving them to be property attributes on the containing property
element which is made an empty element.</p>
<p>Taking the earlier <a href="#example5">Example 5</a>,
the <code>ex:editor</code> property element contains a
blank node element with two property elements
<code>ex:fullname</code> and <code>ex:homePage</code>.
<code>ex:homePage</code> is not suitable here since it
does not have a string literal value, so it is being
<em>ignored</em>. The abbreviated form moves
<code>ex:fullName</code> property element to be
a property attribute on the <code>ex:editor</code> property element
and the blank node element becomes implicit. The result is shown in
<a href="#example13">Example 13</a>.</p>
<div class="exampleOuter">
<div style="align:center"><a id="example13" name="example13">Example 13: Complete example of property attributes on an empty property element</a> (<a href="example13.rdf">example13.rdf</a> output <a href="example13.nt">example13.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
dc:title="RDF/XML Syntax Specification (Revised)"&gt;
&lt;ex:editor ex:fullName="Dave Beckett" /&gt;
&lt;!-- Note the ex:homePage property has been ignored for this example --&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-typed-nodes" name="section-Syntax-typed-nodes">2.13 Typed Node Elements</a></h3>
<p>It is common for RDF Graphs to have <code>rdf:type</code> arcs
from subject nodes. These are conventionally called <em>Typed
Nodes</em> in the graph, or <em>Typed Node Elements</em> in the
RDF/XML. RDF/XML allows this triple to be expressed more concisely.
by replacing the <code>rdf:Description</code> node element name with
the namespaced-element corresponding to the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> of the value of
the type relationship. There may, of course, be multiple <code>rdf:type</code>
arcs but only one can be used in this way, the others must remain as
property elements or property attributes.
</p>
<p>This form is also commonly used in RDF/XML with the built-in
classes in <a href="#section-Namespace">The RDF Namespace</a>:
<code>rdf:Seq</code>, <code>rdf:Bag</code>, <code>rdf:Alt</code>,
<code>rdf:Statement</code>, <code>rdf:Property</code> and
<code>rdf:List</code>.</p>
<p>For example, the RDF/XML in <a href="#example14">Example 14</a>
could be written as shown in <a href="#example15">Example 15</a>.</p>
<div class="exampleOuter">
<div style="align:center"><a id="example14" name="example14">Example 14: Complete example with <code>rdf:type</code></a> (<a href="example14.rdf">example14.rdf</a> output <a href="example14.nt">example14.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;rdf:Description rdf:about="http://example.org/thing"&gt;
&lt;rdf:type rdf:resource="http://example.org/stuff/1.0/Document"/&gt;
&lt;dc:title&gt;A marvelous thing&lt;/dc:title&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<div class="exampleOuter">
<div style="align:center"><a id="example15" name="example15">Example 15: Complete example using a Typed Node Element to replace an <code>rdf:type</code></a> (<a href="example15.rdf">example15.rdf</a> output <a href="example15.nt">example15.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;ex:Document rdf:about="http://example.org/thing"&gt;
&lt;dc:title&gt;A marvelous thing&lt;/dc:title&gt;
&lt;/ex:Document&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-ID-xml-base" name="section-Syntax-ID-xml-base">2.14 Abbreviating URIs - <code>rdf:ID</code> and <code>xml:base</code></a></h3>
<p>RDF/XML allows further abbreviating <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a> in XML attributes in two
ways. The XML Infoset provides a base URI attribute <code>xml:base</code>
that sets the base URI for resolving relative <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>, otherwise the base URI is that of the document. This applies to
all RDF/XML attributes that deal with <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a> which are <code>rdf:about</code>,
<code>rdf:resource</code>, <code>rdf:ID</code>, <code>rdf:bagID</code>
and <code>rdf:datatype</code>.</p>
<p>The <code>rdf:ID</code> attribute on a node element (not property
element, that has another meaning) can be used instead of
<code>rdf:about</code> and gives a relative <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> equivalent to <code>#</code>
concatenated with the <code>rdf:ID</code> attribute value. So for
example if <code>rdf:ID="name"</code>, that would be equivalent
to <code>rdf:about="#name"</code>. This provides an additional
check since the same <em>name</em> can only appear once in the
scope of an <code>xml:base</code> value (or document, if none is given),
so is useful for defining a set of distinct,
related terms relative to the same <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>.</p>
<p><a href="#example16">Example 16</a> shows abbreviating the node
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> of <code>http://example.org/here/#snack</code> using an
<code>xml:base</code> of <code>http://example.org/here/</code> and
an <code>rdf:ID</code> on the <code>rdf:Description</code> node element.
The object node of the <code>ex:prop</code> arc is an
absolute <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
resolved from the <code>rdf:resource</code> XML attribute content
using the in-scope base URI to give the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
<code>http://example.org/here/fruit/apple</code>.</p>
<div class="exampleOuter">
<div style="align:center"><a id="example16" name="example16">Example 16: Complete example using <code>rdf:ID</code> and <code>xml:base</code> for shortening URis </a> (<a href="example16.rdf">example16.rdf</a> output <a href="example16.nt">example16.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.org/stuff/1.0/"
xml:base="http://example.org/here/"&gt;
&lt;rdf:Description rdf:ID="snack"&gt;
&lt;ex:prop rdf:resource="fruit/apple"/&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-list-elements" name="section-Syntax-list-elements">2.15 Container membership property elements - <code>rdf:li</code> and <code>rdf:_</code><em>n</em></a></h3>
<p>RDF has a set of container membership properties
and corresponding property elements that are mostly used with
instances of the
<code>rdf:Seq</code>, <code>rdf:Bag</code> and <code>rdf:Alt</code>
classes which may be written as typed node elements. The list properties are
<code>rdf:_1</code>, <code>rdf:_2</code> etc. and can be written
as property elements or property attributes as shown in
<a href="#example17">Example 17</a>. There is an <code>rdf:li</code>
special property element that is equivalent to
<code>rdf:_1</code>, <code>rdf:_2</code> in order,
explained in detail in <a href="#section-List-Expand">section 7.4</a>.
The equivalent RDF/XML to <a href="#example17">Example 17</a> written
in this form is shown in <a href="#example18">Example 18</a>.
</p>
<div class="exampleOuter">
<div style="align:center"><a id="example17" name="example17">Example 17: Complex example using RDF list properties</a> (<a href="example17.rdf">example17.rdf</a> output <a href="example17.nt">example17.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
&lt;rdf:Seq rdf:about="http://example.org/favourite-fruit"&gt;
&lt;rdf:_1 rdf:resource="http://example.org/banana"/&gt;
&lt;rdf:_2 rdf:resource="http://example.org/apple"/&gt;
&lt;rdf:_3 rdf:resource="http://example.org/pear"/&gt;
&lt;/rdf:Seq&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<div class="exampleOuter">
<div style="align:center"><a id="example18" name="example18">Example 18: Complete example using <code>rdf:li</code> property element for list properties</a> (<a href="example18.rdf">example18.rdf</a> output <a href="example18.nt">example18.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
&lt;rdf:Seq rdf:about="http://example.org/favourite-fruit"&gt;
&lt;rdf:li rdf:resource="http://example.org/banana"/&gt;
&lt;rdf:li rdf:resource="http://example.org/apple"/&gt;
&lt;rdf:li rdf:resource="http://example.org/pear"/&gt;
&lt;/rdf:Seq&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-parsetype-Collection" name="section-Syntax-parsetype-Collection">2.16 Collections - <code>rdf:parseType="Collection"</code></a></h3>
<p>RDF/XML allows an <code>rdf:parseType="Collection"</code>
attribute on a property element to let it contain multiple node
elements. These contained node elements give the set of subject
nodes of the collection. This syntax form corresponds to a set of
triples connecting the collection of subject nodes, the exact triples
generated are described in detail in
<a href="#parseTypeCollectionPropertyElt">Section 7.2.19 Production parseTypeCollectionPropertyElt</a>.</p>
<p><a href="#example19">Example 19</a> shows a collection of three
nodes elements at the end of the <code>ex:hasFruit</code>
property element using this form.</p>
<div class="exampleOuter">
<div style="align:center"><a id="example19" name="example19">Example 19: Complete example of a RDF collection of nodes using <code>rdf:parseType="Collection"</code></a> (<a href="example19.rdf">example19.rdf</a> output <a href="example19.nt">example19.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.org/stuff/1.0/"&gt;
&lt;rdf:Description rdf:about="http://example.org/basket"&gt;
&lt;ex:hasFruit rdf:parseType="Collection"&gt;
&lt;rdf:Description rdf:about="http://example.org/banana"/&gt;
&lt;rdf:Description rdf:about="http://example.org/apple"/&gt;
&lt;rdf:Description rdf:about="http://example.org/pear"/&gt;
&lt;/ex:hasFruit&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-reifying" name="section-Syntax-reifying">2.17 Reifying Statements - <code>rdf:bagID</code> and <code>rdf:ID</code></a></h3>
<p>The <code>rdf:ID</code> attribute can be used on a property
element to reify the triple that it generates (See
<a href="#section-Reification">section 7.3 Reification Rules</a> for the
full details).
The identifier for the triple should be constructed as a
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
made from the relative URI Reference
<code>#</code> concatenated with the <code>rdf:ID</code> attribute
value, resolved against the in-scope base URI. So for example if
<code>rdf:ID="triple"</code>, that would be equivalent to the <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
formed from relative URI Reference <code>#triple</code> against the base URI.
Each (<code>rdf:ID</code> attribute value, base URI)
pair has to be unique in an RDF/XML document and comes from the same
set of values as the <code>rdf:bagID</code> attribute.
See <a href="#constraint-id">constraint-id</a>.
</p>
<p><a href="#example20">Example 20</a> shows a <code>rdf:ID</code>
being used to reify a triple made from the <code>ex:prop</code>
property element giving the reified triple the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> <code>http://example.org/triples/#triple1</code>.</p>
<div class="exampleOuter">
<div style="align:center"><a id="example20" name="example20">Example 20: Complete example of <code>rdf:ID</code> reifying a property element</a> (<a href="example20.rdf">example20.rdf</a> output <a href="example20.nt">example20.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.org/stuff/1.0/"
xml:base="http://example.org/triples/"&gt;
&lt;rdf:Description rdf:about="http://example.org/"&gt;
&lt;ex:prop rdf:ID="triple1"&gt;blah&lt;/ex:prop&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<p>The <code>rdf:bagID</code> attribute can be used on a node element
or empty property element with property attributes,
to give an identifier for an <code>rdf:Bag</code> that lists the
reifications of the statements generated by the property elements or attributes.
This allows statements to be made about that bag. The
identifier is constructed as a relative <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> of <code>#</code>
concatenated with the <code>rdf:bagID</code> attribute value,
resolved against the in-scope base URI to give an
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>. So for
example if <code>rdf:bagID="bag"</code>, that would be equivalent
to the <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> formed from relative URI Reference <code>#bag</code> against the
base URI.
Each (<code>rdf:bagID</code> attribute value, base URI)
has to be unique in the RDF/XML document and from the same set of
names as <code>rdf:ID</code>.
See <a href="#constraint-id">constraint-id</a>.
</p>
<p><a href="#example21">Example 21</a> shows a <code>rdf:Bag</code>
with <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> <code>http://example.org/bags/#bag1</code>
being made of the triples from inside the <code>rdf:Description</code>
node element.</p>
<div class="exampleOuter">
<div style="align:center"><a id="example21" name="example21">Example 21: Complete example of <code>rdf:bagID</code> describing triples from a node element</a> (<a href="example21.rdf">example21.rdf</a> output <a href="example21.nt">example21.nt</a>)</div>
<div class="exampleInner">
<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.org/stuff/1.0/"
xml:base="http://example.org/bags/"&gt;
&lt;rdf:Description rdf:about="http://example.org/" rdf:bagID="bag1"&gt;
&lt;ex:prop1&gt;blah&lt;/ex:prop1&gt;
&lt;ex:prop2 rdf:resource="http://example.org/elsewhere/"/&gt;
&lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>
</div>
</div>
<h3><a id="section-Syntax-more" name="section-Syntax-more">2.18 More Information</a> (Informative)</h3>
<p>The RDF Core Working Group has developed an
<a href="http://www.w3.org/TR/2003/WD-rdf-primer-20030123/">RDF Primer</a>
<a href="#ref-rdfprimer">[RDF-PRIMER]</a>
that goes into detail introducing RDF and its applications.</p>
<p>For a longer introduction to the RDF/XML <em>striped</em> syntax
with a historical perspective, see <a href="http://www.w3.org/2001/10/stripes/">RDF: Understanding the Striped RDF/XML Syntax</a> <a href="#ref-stripedrdf">[STRIPEDRDF]</a>.</p>
<h2>
<a id="section-Terminology" name="section-Terminology">3 Terminology</a>
</h2>
<p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in
<a href="http://www.ietf.org/rfc/rfc2119.txt">RFC 2119</a>
<a href="#ref-keywords">[KEYWORDS]</a>.</p>
<h2><a id="section-MIME-Type" name="section-MIME-Type">4 RDF MIME type, file extension and Macintosh file type</a></h2>
<p>The Internet Media Type / MIME type for RDF is
"<code>application/rdf+xml</code>" -
see <a href="http://www.ietf.org/rfc/rfc3023.txt">RFC 3032</a>
(<a href="#ref-rfc3023">RFC-3023</a>) section 8.18.
</p>
<div class="note"><p><strong>Registration Note:</strong>
The RDF Core Working Group will register this type with the IETF after
this document has passed the Working Draft state, possibly after
<a href="http://www.w3.org/Consortium/Process/Process-19991111/tr.html#RecsW3C">Recommendation</a>,
using the <cite>application/rdf+xml Media Type Registration</cite>
Internet Draft<a href="#ref-rdf-mimetype-id">[RDF-MIMETYPE-ID]</a>
already published and maintained.
</p></div>
<p>It is recommended that RDF files have the extension
<code>".rdf"</code> (all lowercase) on all platforms.</p>
<p>It is recommended that RDF files stored on Macintosh HFS file
systems be given a file type of <code>"rdf&nbsp;"</code>
(all lowercase, with a space character as the fourth letter).</p>
<h2><a id="section-Global" name="section-Global">5 Global Issues</a></h2>
<h3><a id="section-Namespace" name="section-Namespace">5.1 The RDF Namespace</a></h3>
<div class="note"><p><strong>Note:</strong>
The names <code>aboutEach</code> and <code>aboutEachPrefix</code> were removed
from the language and the RDF namespace by the RDF Core Working Group.
See the resolution of issues
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-abouteach">rdfms-abouteach</a> and
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-abouteachprefix">rdfms-abouteachprefix</a>
for further information.
</p></div>
<div class="note"><p><strong>Note:</strong>
The names <code>List</code>, <code>first</code>,
<code>rest</code> and <code>nil</code> were added for issue
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-seq-representation">rdfms-seq-representation</a>.
The names <code>XMLLiteral</code> and <code>datatype</code> were added
to support RDF datatyping.
The name <code>nodeID</code> was added
for issue
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-syntax-incomplete">rdfms-syntax-incomplete</a>.
See the
<a href="http://www.w3.org/2000/03/rdf-tracking/">RDF Core Issues List</a>
for further information.
</p></div>
<div class="note"><p><strong>Note:</strong>
The Working Group invites feedback from the community on the effects
of the removals and additions of these terms on existing
implementations and documents and on the costs and benefits of
adopting a new namespace URI to reflect this change (currently not
proposed by the Working Group).
</p></div>
<p>The
<span class="termdef"><a id="rdf-ns-uri" name="rdf-ns-uri">RDF Namespace URI Reference</a></span> is
<code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code>
and is typically used in XML with the prefix <code>rdf</code>
although other prefix strings may be used. The namespace contains
the following names only:</p>
<dl>
<dt>Syntax names - not concepts</dt>
<dd>
<p>
<code>RDF Description ID about bagID parseType resource li nodeID datatype</code>
</p>
</dd>
<dt>Class names</dt>
<dd>
<p>
<code>Seq Bag Alt Statement Property XMLLiteral List</code>
</p>
</dd>
<dt>Property names</dt>
<dd>
<p>
<code>subject predicate object type value first rest _</code><em>n</em><br />
where <em>n</em> is a decimal integer greater than zero with no leading zeros.
</p>
</dd>
<dt>Resource names</dt>
<dd>
<p>
<code>nil</code>
</p>
</dd>
</dl>
<p>Any other names are not defined and SHOULD generate a warning when
encountered, but should otherwise behave normally.</p>
<p>Within RDF/XML documents it is not permitted to use XML namespaces
whose namespace URI is either:</p>
<ul>
<li>the <a href="#rdf-ns-uri" class="termref"><span class="arrow">·</span>RDF Namespace URI Reference<span class="arrow">·</span></a> concatenated with additional characters. <strong>or</strong></li>
<li>the <a href="http://www.w3.org/TR/REC-xml-names/#nsc-NSDeclared">XML Namespace URI reference</a> concatenated with additional characters.</li>
</ul>
<p>Throughout this document the terminology <code>rdf:</code><em>name</em>
will be used to indicate <em>name</em> is from the RDF namespace
and it has a <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> of the concatenation of the
<a href="#rdf-ns-uri" class="termref"><span class="arrow">·</span>RDF Namespace URI Reference<span class="arrow">·</span></a> and <em>name</em>.
For example, <code>rdf:type</code> has the <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
<code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code></p>
<h3><a id="section-Identifiers" name="section-Identifiers">5.2 Identifiers</a></h3>
<p>The
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-graph">RDF Graph</a>
(<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/">RDF Concepts and Abstract Syntax</a> Section 3)
defines three types of nodes and one type of arc:</p>
<dl>
<dt><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> nodes and arcs</dt>
<dd>
<p><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a> (<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/">RDF Concepts and Abstract Syntax</a> Section 3.1)
can be either given as XML attribute values interpreted as absolute <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>,
XML attribute values interpreted as relative
URI References that are resolved with the in-scope base URI
as described in section <a href="#section-baseURIs">section 5.3</a>
to give absolute <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>,
transformed from XML Namespace-qualified element and attributes names
(QNames) or transformed from <code>rdf:ID</code> and <code>rdf:bagID</code> attribute values.</p>
<p>Within RDF/XML, XML QNames are transformed into
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
by appending the XML local name to the namespace URI. For
example, if the XML Namespace prefix <code>foo</code> has URI
<code>http://example.org/somewhere/</code> then the QName
<code>foo:bar</code> would correspond to the URI
<code>http://example.org/somewhere/bar</code>. Note that this
restricts which
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a> can be made and the same URI can be given in multiple ways.</p>
<p>The <a href="#idAttr"><code>rdf:ID</code></a> and
<a href="#bagIdAttr"><code>rdf:bagID</code></a> values
are transformed into an
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
by appending the attribute value to the result of appending
"#" to the in-scope base URI which is defined in
<a href="#section-baseURIs">Section 5.3 Resolving URIs</a></p>
</dd>
<dt>Literal nodes (always object nodes)</dt>
<dd><p>
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-literal">RDF Literals</a> (<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/">RDF Concepts and Abstract Syntax</a> 6.5) are either
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-plain-literal">Plain Literals</a> (ibid),
or
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-typed-literal">Typed Literals</a> (ibid).
The latter includes <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-XMLLiteral">XML Literals</a> (ibid section 5, <cite>XML Content within an RDF Graph</cite>).
</p>
</dd>
<dt>Blank Node Identifiers</dt>
<dd><p><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node">Blank Nodes</a> have distinct identity in the RDF Graph.
When the graph is written in a syntax such as RDF/XML, these
blank nodes may need graph-local identifiers and a syntax
in order to preserve this distinction. These local identifiers are called
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node-id">Blank Node Identifiers</a>
and are used in RDF/XML as values of the <code>rdf:nodeID</code> attribute
with the syntax given in <a href="#nodeIdAttr">Production nodeIdAttr</a>.
Blank node identifiers in RDF/XML are scoped to the XML Information Set
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.document">Document Information Item</a>.</p>
<p>These identifiers may also be generated as part of the mapping
from the RDF/XML to the graph for new distinct blank nodes. Such
generated blank node identifiers must not clash with any blank node
identifiers from <code>rdf:nodeID</code> attribute values. This can
be implemented by any method that preserves the distinct identity of
all the blank nodes in the graph. One method would be to add a
constant prefix to all the <code>rdf:nodeID</code> attribute values
and ensure no generated blank node identifiers ever used that prefix.
</p>
</dd>
</dl>
<h3><a id="section-baseURIs" name="section-baseURIs">5.3 Resolving URIs</a></h3>
<p>RDF/XML supports
<a href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML Base</a> <a href="#ref-xml-base">[XML-BASE]</a>
which defines a
<a href="#eventterm-element-base-uri" class="termref"><span class="arrow">·</span>base-uri<span class="arrow">·</span></a>
accessor for each
<a href="#section-root-node"><span class="arrow">·</span>root event<span class="arrow">·</span></a> and
<a href="#section-element-node"><span class="arrow">·</span>element event<span class="arrow">·</span></a>.
Relative URI References are resolved into
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
according to the algorithm specified in
<a href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML Base</a> <a href="#ref-xml-base">[XML-BASE]</a>
(and RFC 2396).
These specifications do not specify an algorithm for resolving a
fragment identifier alone, such as <code>#foo</code>, or the empty
string <code>""</code> into an
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>. In RDF/XML, a fragment identifier
is transformed into a
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
by appending the fragment identifier to the in-scope base URI. The
empty string is transformed
into an
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>
by substituting the in-scope base URI.
</p>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test001.rdf">test001.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test001.nt">test001.nt</a>
</p></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test004.rdf">test004.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test004.nt">test004.nt</a>
</p></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test008.rdf">test008.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test008.nt">test008.nt</a>
</p></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test013.rdf">test013.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test013.nt">test013.nt</a>
</p></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test016.rdf">test016.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test016.nt">test016.nt</a>
</p></div>
<p>An empty same document reference ""
resolves against the URI part of the Base URI; any fragment part
is ignored. See
<a href="http://www.isi.edu/in-notes/rfc2396.txt">Uniform Resource Identifiers (URI)</a> <a href="#ref-uri">[URIS]</a> section 4.2
</p>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test013.rdf">test013.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test013.nt">test013.nt</a>
</p></div>
<div class="note"><p><strong>Implementor Note:</strong>
When using a hierarchical base
URI that has no path component (/), it must be added before using as a
base URI for resolving.
</p></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test011.rdf">test011.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test011.nt">test011.nt</a>
</p></div>
<h3><a id="section-constraints" name="section-constraints">5.4 Constraints</a></h3>
<dl>
<dt><strong><a id="constraint-id" name="constraint-id">constraint-id</a></strong><br /></dt>
<dd><p>Each application of productions <a href="#idAttr">idAttr</a>
and <a href="#bagIdAttr">bagIdAttr</a> match an attribute. The pair
formed by the
<a href="#eventterm-attribute-string-value" class="termref"><span class="arrow">·</span>string-value<span class="arrow">·</span></a>
accessor of the matched attribute and the
<a href="#eventterm-element-base-uri" class="termref"><span class="arrow">·</span>base-uri<span class="arrow">·</span></a>
accessor of the matched attribute is unique within a single RDF/XML
document.</p>
<p>The syntax of the names must match the
<a href="#rdf-id">rdf-id production</a></p>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test014.rdf">test014.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/test014.nt">test014.nt</a>
</p></div>
</dd>
</dl>
<h2>
<a id="section-Data-Model" name="section-Data-Model">6 Syntax Data Model</a>
</h2>
<p>This document specifies the syntax of RDF/XML as a grammar on an
alphabet of symbols. The symbols are called <em>Events</em> in the
style of the <a href="#ref-xpath">[XPATH]</a>&#160;
<a href="http://www.w3.org/TR/xpath#infoset">Information Set Mapping</a>.
A sequence of events is normally derived from an XML document, in
which case they are in document order as defined below in
<a href="#section-Infoset-Mapping">Section 6.2 Information Set Mapping</a>.
This sequence of events formed are intended to be similar to the sequence
of events produced by the <a href="#ref-sax">[SAX2]</a> XML API from
the same XML document. Sequences of events may be checked against
the grammar to determine whether they are or are not syntactically
well formed RDF/XML.</p>
<p>The grammar productions may include actions which fire when the
production is recognised. Taken together these actions define a
transformation from any syntactically well formed RDF/XML sequence of
events into an RDF Graph represented in the
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/#ntriples">N-Triples</a>
language.</p>
<p>This model illustrates one way to create a representation of
an <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-graph">RDF Graph</a>
from an RDF/XML document. It does not mandate any implementation
method - any other method that results in a representation of the same
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-graph">RDF Graph</a>
may be used.</p>
<p>In particular:</p>
<ul>
<li>This specification does not require that
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/#ntriples">N-Triples</a>
be used to represent an RDF Graph.</li>
<li>This specification does not require the use of
<a href="#ref-xpath">[XPATH]</a> or <a href="#ref-sax">[SAX2]</a></li>
<li>This specification places no constraints on the order in which
software transforming RDF/XML into a representation of a graph,
constructs the representation of the graph.</li>
<li>Software transforming RDF/XML into a representation of a graph
MAY eliminate duplicate arcs.</li>
</ul>
<p>The syntax does not support non-well-formed XML documents, nor
documents that otherwise do not have an XML Information Set; for
example, that do not conform to
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">XML Namespaces</a>
<a href="#ref-namespaces">[XML-NS]</a>.
</p>
<p>The Infoset requires support for
<a href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML Base</a> <a href="#ref-xml-base">[XML-BASE]</a>.
RDF/XML uses the information item property [base URI], discussed in
<a href="#section-baseURIs">section 5.3</a>
</p>
<p>This specification requires an
XML Information Set<a href="#ref-xml-infoset">[INFOSET]</a>
which supports at least the following information items and
properties for RDF/XML:</p>
<dl>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.document">Document Information Item</a></dt>
<dd>[document element], [children], [base URI]</dd>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.element">Element Information Item</a></dt>
<dd>[local name], [namespace name], [children], [attributes], [parent], [base URI]</dd>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">Attribute Information Item</a></dt>
<dd>[local name], [namespace name], [normalized value]</dd>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.character">Character Information Item</a></dt>
<dd>[character code]</dd>
</dl>
<p>There is no mapping of the following items to data model events:</p>
<dl>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.pi">Processing Instruction Information Item</a></dt>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.rse">Unexpanded Entity Reference Information Item</a></dt>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.comment">Comment Information Item</a></dt>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.doctype">Document Type Declaration Information Item</a></dt>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed">Unparsed Entity Information Item</a></dt>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.notation">Notation Information Item</a></dt>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace">Namespace Information Item</a></dt>
</dl>
<p>Other information items and properties have no mapping to
syntax data model events.
</p>
<p>Information items contained inside XML elements matching the
<a href="#parseTypeLiteralPropertyElt">parseTypeLiteralPropertyElt</a>
production form
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-XMLLiteral">XML Literals</a>
and do not follow this mapping. See
<a href="#parseTypeLiteralPropertyElt">parseTypeLiteralPropertyElt</a>
for further information.</p>
<p>This section is intended to satisfy the requirements for
<a href="http://www.w3.org/TR/xml-infoset/#conformance">Conformance</a>
in the <a href="#ref-xml-infoset">[INFOSET]</a> specification.
It specifies the information items and properties that are needed
to implement this specification.
</p>
<h3>
<a id="section-Nodes" name="section-Nodes">6.1 Events</a>
</h3>
<p>There are six types of event defined in the following subsections.
Most events are constructed from an Infoset information item (except
for <a href="#section-identifier-node">Identifier</a>,
<a href="#section-literal-node">Plain Literal</a> and
<a href="#section-typed-literal-node">Typed Literal</a>). The effect
of an event constructor is to create a new event with a unique identity,
distinct from all other events. Events have accessor operations on them.
and all have the <em>string-value</em> accessor that may be a static value
or computed.</p>
<h3>
<a id="section-root-node" name="section-root-node">6.1.1 Root Event</a>
</h3>
<p>Constructed from a
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.document">Document Information Item</a>
and takes the following accessors and values.</p>
<dl>
<dt><span class="termdef"><a id="eventterm-root-document-element" name="eventterm-root-document-element">document-element</a></span><br /></dt>
<dd>Set to the value of document information item property document-element.</dd>
<dt><span class="termdef"><a id="eventterm-root-children" name="eventterm-root-children">children</a></span><br /></dt>
<dd>Set to the value of document information item property [children].</dd>
<dt><span class="termdef"><a id="eventterm-root-base-uri" name="eventterm-root-base-uri">base-uri</a></span><br /></dt>
<dd>Set to the value of document information item property [base URI].</dd>
<dt><span class="termdef"><a id="eventterm-root-language" name="eventterm-root-language">language</a></span><br /></dt>
<dd>Set to the empty string.</dd>
</dl>
<h3>
<a id="section-element-node" name="section-element-node">6.1.2 Element Event</a>
</h3>
<p>Constructed from an
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element">Element Information Item</a>
and takes the following accessors and values:
</p>
<dl>
<dt><span class="termdef"><a id="eventterm-element-local-name" name="eventterm-element-local-name">local-name</a></span><br /></dt>
<dd>Set to the value of element information item property [local name].</dd>
<dt><span class="termdef"><a id="eventterm-element-namespace-name" name="eventterm-element-namespace-name">namespace-name</a></span><br /></dt>
<dd>Set to the value of element information item property [namespace name].</dd>
<dt><span class="termdef"><a id="eventterm-element-children" name="eventterm-element-children">children</a></span><br /></dt>
<dd>Set to the value of element information item property [children].</dd>
<dt><span class="termdef"><a id="eventterm-element-base-uri" name="eventterm-element-base-uri">base-uri</a></span><br /></dt>
<dd>Set to the value of element information item property [base URI].</dd>
<dt><span class="termdef"><a id="eventterm-element-attributes" name="eventterm-element-attributes">attributes</a></span><br /></dt>
<dd><p>Set to the value of element information item property [attributes].</p>
<p>If the value contains an attribute event <code>xml:lang</code> (that is, the
<a href="#eventterm-attribute-local-name" class="termref"><span class="arrow">·</span>local-name<span class="arrow">·</span></a>
accessor of the attribute has value "lang" and the
<a href="#eventterm-attribute-namespace-name" class="termref"><span class="arrow">·</span>namespace-name<span class="arrow">·</span></a>
accessor of the attribute has value
"http://www.w3.org/XML/1998/namespace"), it is removed
from the list of attributes and the
<a href="#eventterm-element-language" class="termref"><span class="arrow">·</span>language<span class="arrow">·</span></a> accessor is set to the
string-value of the attribute.</p>
<p>All other attributes beginning with <code>xml</code> are then removed
(that is, all attributes with
<a href="#eventterm-attribute-namespace-name" class="termref"><span class="arrow">·</span>namespace-name<span class="arrow">·</span></a>
accessors values beginning with
"http://www.w3.org/XML/1998/namespace"). Note: the base URI is
computed before any <code>xml:base</code> attribute is deleted.</p>
</dd>
<dt><span class="termdef"><a id="eventterm-element-URI" name="eventterm-element-URI">URI</a></span><br /></dt>
<dd>Set to the string value of the concatenation of the
value of the namespace-name accessor and the value of the
local-name accessor.
</dd>
<dt><span class="termdef"><a id="eventterm-element-liCounter" name="eventterm-element-liCounter">li-counter</a></span><br /></dt>
<dd>Set to the integer value 1.</dd>
<dt><span class="termdef"><a id="eventterm-element-bag-li-counter" name="eventterm-element-bag-li-counter">bag-li-counter</a></span><br /></dt>
<dd>set to the integer value 1.</dd>
<dt><span class="termdef"><a id="eventterm-element-language" name="eventterm-element-language">language</a></span><br /></dt>
<dd>Set from the
<a href="#eventterm-element-attributes" class="termref"><span class="arrow">·</span>attributes<span class="arrow">·</span></a>
as described above.
If no value is given from the attributes, the value is set to the value of
the language accessor on the parent event (either a
<a href="#section-root-node">Root Event</a> or an
<a href="#section-element-node">Element Event</a>), which may be the empty string.
</dd>
<dt><span class="termdef"><a id="eventterm-element-subject" name="eventterm-element-subject">subject</a></span><br /></dt>
<dd>Has no initial value. Takes a value that is an
<a href="#section-identifier-node">Identifier</a> event.
This is used on elements that deal with one node in the RDF Graph,
this generally being the subject of a statement.</dd>
</dl>
<h3>
<a id="section-end-element-node" name="section-end-element-node">6.1.3 End Element Event</a>
</h3>
<p>Has no accessors. Marks the end of the containing element in
the sequence.</p>
<h3>
<a id="section-attribute-node" name="section-attribute-node">6.1.4 Attribute Event</a>
</h3>
<p>Constructed from an
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">Attribute Information Item</a>
and takes the following accessors and values:</p>
<dl>
<dt><span class="termdef"><a id="eventterm-attribute-local-name" name="eventterm-attribute-local-name">local-name</a></span><br /></dt>
<dd>Set to the value of attribute information item property [local name].</dd>
<dt><span class="termdef"><a id="eventterm-attribute-namespace-name" name="eventterm-attribute-namespace-name">namespace-name</a></span><br /></dt>
<dd>Set to the value of attribute information item property [namespace name].</dd>
<dt><span class="termdef"><a id="eventterm-attribute-string-value" name="eventterm-attribute-string-value">string-value</a></span><br /></dt>
<dd>set to the value of the attribute information item property [normalized value] as specified by
<a href="#ref-xml">[XML]</a> (if an attribute whose normalized
value is a zero-length string, then the string-value is also
a zero-length string).</dd>
<dt><span class="termdef"><a id="eventterm-attribute-URI" name="eventterm-attribute-URI">URI</a></span><br /></dt>
<dd><p>If <a href="#eventterm-attribute-namespace-name" class="termref"><span class="arrow">·</span>namespace-name<span class="arrow">·</span></a> is present,
set to a string value of the concatenation of the value of the
<a href="#eventterm-attribute-namespace-name" class="termref"><span class="arrow">·</span>namespace-name<span class="arrow">·</span></a> accessor
and the value of the
<a href="#eventterm-attribute-local-name" class="termref"><span class="arrow">·</span>local-name<span class="arrow">·</span></a> accessor.
Otherwise if <a href="#eventterm-attribute-local-name" class="termref"><span class="arrow">·</span>local-name<span class="arrow">·</span></a> is
<code>ID</code>, <code>bagID</code>, <code>about</code>, <code>resource</code>, <code>parseType</code> or <code>type</code>, set to a string value of the
concatenation of the
<a href="#rdf-ns-uri" class="termref"><span class="arrow">·</span>RDF Namespace URI Reference<span class="arrow">·</span></a>
and the value of the <a href="#eventterm-attribute-local-name" class="termref"><span class="arrow">·</span>local-name<span class="arrow">·</span></a> accessor. Other non-namespaced <a href="#eventterm-attribute-local-name" class="termref"><span class="arrow">·</span>local-name<span class="arrow">·</span></a> accessor values are forbidden.</p>
<p>This support for a limited set of non-namespaced names is
REQUIRED and intended to allow RDF/XML documents specified in
<a href="#ref-rdfms">[RDF-MS]</a> to remain valid; new documents
SHOULD NOT use these unqualified attributes and applications MAY
choose to warn when the unqualified form is seen in a document.</p>
<p>The construction of
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
from XML attributes can generate the same
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
from different XML attributes. This can cause ambiguity in the
grammar when matching attribute events (such as when
<code>rdf:about</code> and <code>about</code> XML attributes are
both present). Documents that have this are illegal.
</p>
</dd>
</dl>
<h3>
<a id="section-text-node" name="section-text-node">6.1.5 Text Event</a>
</h3>
<p>Constructed from a sequence of one or more consecutive
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character">Character Information Items</a>.
Has the single accessor:</p>
<dl>
<dt><span class="termdef"><a id="eventterm-text-string-value" name="eventterm-text-string-value">string-value</a></span><br /></dt>
<dd>Set to the value of the string made from concatenating the
[<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character">character code</a>] property of each of the character information items.
</dd>
</dl>
<h3>
<a id="section-identifier-node" name="section-identifier-node">6.1.6 URI Reference Event</a>
</h3>
<p><a id="eventterm-identifier-identifier-type" name="eventterm-identifier-identifier-type"></a>
An event for a
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a>
which has the following accessors:</p>
<dl>
<dt><span class="termdef"><a id="eventterm-identifier-identifier" name="eventterm-identifier-identifier">identifier</a></span><br /></dt>
<dd>Takes a string value.</dd>
<dt><span class="termdef"><a id="eventterm-identifier-string-value" name="eventterm-identifier-string-value">string-value</a></span><br /></dt>
<dd>The value is the concatenation of "&lt;", the value of the <a href="#eventterm-identifier-identifier" class="termref"><span class="arrow">·</span>identifier<span class="arrow">·</span></a> accessor and "&gt;"</dd>
</dl>
<p>These events are constructed by giving a value for the
<a href="#eventterm-identifier-identifier" class="termref"><span class="arrow">·</span>identifier<span class="arrow">·</span></a> accessor.
</p>
<p>For further information on identifiers in the RDF Graph, see
<a href="#section-Identifiers">section 5.2</a>.</p>
<h3>
<a id="section-blank-nodeid-event" name="section-blank-nodeid-event">6.1.7 Blank Node Identifier Event</a>
</h3>
<p>An event for a
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node-id">Blank Node Identifier</a>
which has the following accessors:</p>
<dl>
<dt><span class="termdef"><a id="eventterm-blanknodeid-identifier" name="eventterm-blanknodeid-identifier">identifier</a></span><br /></dt>
<dd>Takes a string value.</dd>
<dt><span class="termdef"><a id="eventterm-blanknodeid-string-value" name="eventterm-blanknodeid-string-value">string-value</a></span><br /></dt>
<dd>The value is the concatenation of "_:" and the value of the <a href="#eventterm-blanknodeid-identifier" class="termref"><span class="arrow">·</span>identifier<span class="arrow">·</span></a> accessor.</dd>
</dl>
<p>These events are constructed by giving a value for the
<a href="#eventterm-blanknodeid-identifier" class="termref"><span class="arrow">·</span>identifier<span class="arrow">·</span></a> accessor.
</p>
<p>For further information on identifiers in the RDF Graph, see
<a href="#section-Identifiers">section 5.2</a>.</p>
<h3>
<a id="section-literal-node" name="section-literal-node">6.1.8 Plain Literal Event</a>
</h3>
<p>An event for a <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-plain-literal">Plain Literal</a> which can have the following accessors:</p>
<dl>
<dt><span class="termdef"><a id="eventterm-literal-literal-value" name="eventterm-literal-literal-value">literal-value</a></span><br /></dt>
<dd>Takes a string value.</dd>
<dt><span class="termdef"><a id="eventterm-literal-literal-language" name="eventterm-literal-literal-language">literal-language</a></span><br /></dt>
<dd>Takes a string value.</dd>
<dt><span class="termdef"><a id="eventterm-literal-string-value" name="eventterm-literal-string-value">string-value</a></span><br /></dt>
<dd><p>The value is calculated from the other accessors as follows.</p>
<p>If <a href="#eventterm-literal-literal-language" class="termref"><span class="arrow">·</span>literal-language<span class="arrow">·</span></a> is the empty string
then the value is the concatenation of "&quot;" (1 double quote),
the value of the
2 <a href="#eventterm-literal-literal-value" class="termref"><span class="arrow">·</span>literal-value<span class="arrow">·</span></a> accessor
and "&quot;" (1 double quote).</p>
<p>Otherwise the value is the concatenation of "&quot;" (1 double quote),
the value of the
<a href="#eventterm-literal-literal-value" class="termref"><span class="arrow">·</span>literal-value<span class="arrow">·</span></a> accessor
"&quot;@" (1 double quote and a '@'),
and the value of the
<a href="#eventterm-literal-literal-language" class="termref"><span class="arrow">·</span>literal-language<span class="arrow">·</span></a> accessor.</p>
<p>Note that the double-quoted <a href="#eventterm-literal-literal-value" class="termref"><span class="arrow">·</span>literal-value<span class="arrow">·</span></a> string must use the N-Triples
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/#ntrip_strings">string escapes</a>
for escaping certain characters such as &quot;. </p>
</dd>
</dl>
<p>These events are constructed by giving values for the
<a href="#eventterm-literal-literal-value" class="termref"><span class="arrow">·</span>literal-value<span class="arrow">·</span></a> and
<a href="#eventterm-literal-literal-language" class="termref"><span class="arrow">·</span>literal-language<span class="arrow">·</span></a> accessors.</p>
<div class="note"><p><strong>Note:</strong>
<a id="literal-comb-char-note1" name="literal-comb-char-note1"></a>
Literals beginning with a Unicode combining character are
allowed however they may cause interoperability problems.
See <a href="#ref-charmod">[CHARMOD]</a> for further information.
</p></div>
<h3>
<a id="section-xml-literal-node" name="section-xml-literal-node"></a>
<a id="section-typed-literal-node" name="section-typed-literal-node">6.1.9 Typed Literal Event</a>
</h3>
<p>An event for a <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-typed-literal">Typed Literal</a> which can have the following accessors:</p>
<dl>
<dt><a id="eventterm-xmlliteral-literal-value" name="eventterm-xmlliteral-literal-value"></a><span class="termdef"><a id="eventterm-typedliteral-literal-value" name="eventterm-typedliteral-literal-value">literal-value</a></span><br /></dt>
<dd>Takes a string value.</dd>
<dt><a id="eventterm-xmlliteral-literal-language" name="eventterm-xmlliteral-literal-language"></a><span class="termdef"><a id="eventterm-typedliteral-literal-language" name="eventterm-typedliteral-literal-language">literal-language</a></span><br /></dt>
<dd>Takes a string value.</dd>
<dt><a id="eventterm-literal-literal-datatype" name="eventterm-literal-literal-datatype"></a><span class="termdef"><a id="eventterm-typedliteral-literal-datatype" name="eventterm-typedliteral-literal-datatype">literal-datatype</a></span><br /></dt>
<dd>Takes a string value used as an absolute URI reference..</dd>
<dt><a id="eventterm-xmlliteral-string-value" name="eventterm-xmlliteral-string-value"></a><span class="termdef"><a id="eventterm-typedliteral-string-value" name="eventterm-typedliteral-string-value">string-value</a></span><br /></dt>
<dd><p>The value is calculated from the other accessors as follows.</p>
<p>If <a href="#eventterm-typedliteral-literal-language" class="termref"><span class="arrow">·</span>literal-language<span class="arrow">·</span></a> is the empty string
then the value is the concatenation of "&quot;" (1 double quote),
the value of the
<a href="#eventterm-typedliteral-literal-value" class="termref"><span class="arrow">·</span>literal-value<span class="arrow">·</span></a> accessor
and "&quot;" (1 double quote).</p>
<p>Otherwise the value is the concatenation of "&quot;" (1 double quote),
the value of the
<a href="#eventterm-typedliteral-literal-value" class="termref"><span class="arrow">·</span>literal-value<span class="arrow">·</span></a> accessor
"&quot;@" (1 double quote and a '@')
and the value of the
<a href="#eventterm-typedliteral-literal-language" class="termref"><span class="arrow">·</span>literal-language<span class="arrow">·</span></a> accessor.</p>
<p>Finally, if <a href="#eventterm-typedliteral-literal-datatype" class="termref"><span class="arrow">·</span>literal-datatype<span class="arrow">·</span></a> is not empty
then append to the value calculated above "^^&lt;" concatenated with
the value of the
<a href="#eventterm-typedliteral-literal-datatype" class="termref"><span class="arrow">·</span>literal-datatype<span class="arrow">·</span></a> accessor
concatenated with "&gt;".
</p>
<p>Note that the double-quoted literal-value string must use the N-Triples
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/#ntrip_strings">string escapes</a>
for escaping certain characters such as &quot;.</p>
</dd>
</dl>
<p>These events are constructed by giving values for the
<a href="#eventterm-typedliteral-literal-value" class="termref"><span class="arrow">·</span>literal-value<span class="arrow">·</span></a>,
<a href="#eventterm-typedliteral-literal-language" class="termref"><span class="arrow">·</span>literal-language<span class="arrow">·</span></a> and
<a href="#eventterm-typedliteral-literal-datatype" class="termref"><span class="arrow">·</span>literal-datatype<span class="arrow">·</span></a> accessors.</p>
<div class="note"><p><strong>Note:</strong>
<a id="literal-comb-char-note2" name="literal-comb-char-note2"></a>
Literals beginning with a Unicode combining character are
allowed however they may cause interoperability problems.
See <a href="#ref-charmod">[CHARMOD]</a> for further information.
</p></div>
<h3>
<a id="section-Infoset-Conformance" name="section-Infoset-Conformance"></a>
<a id="section-Infoset-Mapping" name="section-Infoset-Mapping">6.2 Information Set Mapping</a>
</h3>
<p>To transform the Infoset into the sequence of events
in <em>document order</em>, each
information item is transformed as described above to generate a
tree of events with accessors and values. Each element event is
then replaced as described below to turn the tree of events
into a sequence in document order.</p>
<ol>
<li>The original <a href="#section-element-node">element event</a></li>
<li>The value of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</a>
accessor recursively transformed, a possibly empty ordered list of events.</li>
<li>An <a href="#section-end-element-node">end element event</a></li>
</ol>
<h3>
<a id="section-Notation-Forms" name="section-Notation-Forms"></a>
<a id="section-Infoset-Grammar-Notation" name="section-Infoset-Grammar-Notation">6.3 Grammar Notation</a>
</h3>
<p>The following notation is used for matching the sequence
of events generated as described in <a href="#section-Data-Model">Section 6</a>
and describing the actions to perform for the matches.
The RDF/XML grammar is defined here in terms of its
data model events, using statements of the form:</p>
<blockquote>
<div class="productionOuter"><div class="productionInner"><p>
number <em>event-type</em> <em>event-content</em>
</p></div></div>
<div>
<em>action</em>...
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code>
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/#ntriples">N-Triples</a>
</code>
</p></div></div>
</div>
</blockquote>
<p>where the <em>event-content</em> is an expression, which may refer
to other <em>event-types</em> (as defined in
<a href="#section-Nodes">Section 6.1</a>),
using constructs of the form given in the
following table. The number is used for reference purposes.
The <em>action</em> may include generating
new triples to the graph, written in
<a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/#ntriples">N-Triples</a>
format.
</p>
<table border="1" summary="This table describes the notation used in the following sections to match sequences of events and perform grammar actions.">
<caption>Notation for matching events and grammar actions.</caption>
<tr>
<th colspan="2">General Notation</th>
</tr>
<tr>
<th>Notation</th>
<th>Meaning</th>
</tr>
<tr>
<td><em>event</em>.<em>accessor</em></td>
<td>The value of an event accessor.</td>
</tr>
<tr>
<td><code>rdf:</code><em>X</em></td>
<td>A URI as defined in <a href="#section-Namespace">section 5.1</a>.</td>
</tr>
<tr>
<td>"ABC"</td>
<td>A string of characters A, B, C in order.</td>
</tr>
<tr>
<th colspan="2">Notation for Matching Events</th>
</tr>
<tr>
<th>Notation</th>
<th>Meaning</th>
</tr>
<tr>
<td>A == B</td>
<td>A is equal to B.</td>
</tr>
<tr>
<td>A != B</td>
<td>A is not equal to B.</td>
</tr>
<tr>
<td>A | B | ...</td>
<td>The A, B, ... terms are alternatives.</td>
</tr>
<tr>
<td>A - B</td>
<td>The term A but not the term B.</td>
</tr>
<tr>
<td><a id="anyURI" name="anyURI">anyURI</a>.</td>
<td>Any URI.</td>
</tr>
<tr>
<td><a id="anyString" name="anyString">anyString</a>.</td>
<td>Any string.</td>
</tr>
<tr>
<td>list(item1, item2, ...); list()</td>
<td>An ordered list of events. An empty list.</td>
</tr>
<tr>
<td>set(item1, item2, ...); set()</td>
<td>An unordered set of events. An empty set.</td>
</tr>
<tr>
<td>*</td>
<td>Zero or more of preceding term.</td>
</tr>
<tr>
<td>?</td>
<td>Zero or one of preceding term.</td>
</tr>
<tr>
<td>+</td>
<td>One or more of preceding term.</td>
</tr>
<tr>
<td>root(acc1 == value1,<br />
&#160;&#160;&#160;&#160;acc2 == value2, ...)</td>
<td>Match a <a href="#section-root-node">Root Event</a> with accessors.
</td>
</tr>
<tr>
<td>start-element(acc1 == value1,<br />
&#160;&#160;&#160;&#160;acc2 == value2, ...)<br />
<em>children</em><br />
end-element()</td>
<td>Match a sequence of
<a href="#section-element-node">Element Event</a> with accessors,
a possibly empty list of events as element content and an
<a href="#section-end-element-node">End Element Event</a>.
</td>
</tr>
<tr>
<td>attribute(acc1 == value1,<br />
&#160;&#160;&#160;&#160;acc2 == value2, ...)</td>
<td>Match an <a href="#section-attribute-node">Attribute Event</a>
with accessors.</td>
</tr>
<tr>
<td>text()</td>
<td>Match a <a href="#section-text-node">Text Event</a>.</td>
</tr>
<tr>
<th colspan="2">Notation for Grammar Actions</th>
</tr>
<tr>
<th>Notation</th>
<th>Meaning</th>
</tr>
<tr>
<td>A := B</td>
<td>Assigns A the value B.</td>
</tr>
<tr>
<td>concat(A, B, ..)</td>
<td>A string created by concatenating the terms in order.</td>
</tr>
<tr>
<td>resolve(<em>e</em>, <em>s</em>)</td>
<td>A string created by interpreting <em>s</em> as a relative URI reference to the
<a href="#eventterm-element-base-uri" class="termref"><span class="arrow">·</span>base-uri<span class="arrow">·</span></a> accessor of <a href="#section-element-node"><span class="arrow">·</span>Element Event<span class="arrow">·</span></a> <em>e</em>
as defined in <a href="#section-baseURIs">Section 5.3 Resolving URIs</a>.
The resulting string represents an
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>.</td>
</tr>
<tr>
<td>generated-blank-node-id()</td>
<td>A string value for a new distinct generated
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-blank-node-id">Blank Node Identifier</a>
as defined in <a href="#section-Identifiers">section 5.2 Identifiers</a>.
</td>
</tr>
<tr>
<td><em>event</em>.<em>accessor</em> := <em>value</em></td>
<td>Sets an event accessor to the given value.</td>
</tr>
<tr>
<td>uri(identifier := value)</td>
<td>Create a new <a href="#section-identifier-node">URI Reference Event</a>.</td>
</tr>
<tr>
<td>bnodeid(identifier := value)</td>
<td>Create a new <a href="#section-blank-nodeid-event">Blank Node Identifier Event</a>.</td>
</tr>
<tr>
<td>literal(literal-value := string,<br />
&#160;&#160;&#160;&#160;literal-language := language, ...)</td>
<td>Create a new <a href="#section-literal-node">Plain Literal Event</a>.</td>
</tr>
<tr>
<td>typed-literal(literal-value := string,<br />
&#160;&#160;&#160;&#160;literal-language := language, ...)</td>
<td>Create a new <a href="#section-typed-literal-node">Typed Literal Event</a>.</td>
</tr>
</table>
<h2>
<a id="section-Infoset-Grammar" name="section-Infoset-Grammar">7 RDF/XML Grammar</a>
</h2>
<h3><a id="section-grammar-summary" name="section-grammar-summary">7.1 Grammar summary</a></h3>
<div class="productionOuter"><div class="productionInner">
<table>
<tr valign="top">
<td><a href="#coreSyntaxTerms">7.2.2</a> <a href="#coreSyntaxTerms">coreSyntaxTerms</a></td> <td><code>rdf:RDF</code> | <code>rdf:ID</code> | <code>rdf:about</code> | <code>rdf:bagID</code> | <code>rdf:parseType</code> | <code>rdf:resource</code> | <code>rdf:nodeID</code> | <code>rdf:datatype</code></td>
</tr>
<tr valign="top">
<td><a href="#syntaxTerms">7.2.3</a> <a href="#syntaxTerms">syntaxTerms</a></td> <td><a href="#coreSyntaxTerms">coreSyntaxTerms</a> | <code>rdf:Description</code> | <code>rdf:li</code></td>
</tr>
<tr valign="top">
<td><a href="#oldTerms">7.2.4</a> <a href="#oldTerms">oldTerms</a></td> <td><code>rdf:aboutEach</code> | <code>rdf:aboutEachPrefix</code></td>
</tr>
<tr valign="top">
<td><a href="#nodeElementURIs">7.2.5</a> <a href="#nodeElementURIs">nodeElementURIs</a></td> <td><a href="#anyURI">anyURI</a> - ( <a href="#coreSyntaxTerms">coreSyntaxTerms</a> | <code>rdf:li</code> | <a href="#oldTerms">oldTerms</a> )</td>
</tr>
<tr valign="top">
<td><a href="#propertyElementURIs">7.2.6</a> <a href="#propertyElementURIs">propertyElementURIs</a></td> <td><a href="#anyURI">anyURI</a> - ( <a href="#coreSyntaxTerms">coreSyntaxTerms</a> | <code>rdf:Description</code> | <a href="#oldTerms">oldTerms</a> )</td>
</tr>
<tr valign="top">
<td><a href="#propertyAttributeURIs">7.2.7</a> <a href="#propertyAttributeURIs">propertyAttributeURIs</a></td> <td><a href="#anyURI">anyURI</a> - ( <a href="#coreSyntaxTerms">coreSyntaxTerms</a> | <code>rdf:Description</code> | <code>rdf:li</code> | <a href="#oldTerms">oldTerms</a> )</td>
</tr>
<tr valign="top">
<td><a href="#doc">7.2.8</a> <a href="#doc">doc</a></td> <td>root(<a href="#eventterm-root-document-element">document-element</a> == <a href="#RDF">RDF</a>,
<a href="#eventterm-root-children">children</a> == list(<a href="#RDF">RDF</a>))</td>
</tr>
<tr valign="top">
<td><a href="#RDF">7.2.9</a> <a href="#RDF">RDF</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <code>rdf:RDF</code>,
<a href="#eventterm-element-attributes">attributes</a> == set())<br />
<a href="#nodeElementList">nodeElementList</a><br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#nodeElementList">7.2.10</a> <a href="#nodeElementList">nodeElementList</a></td> <td><a href="#ws">ws</a>* (<a href="#nodeElement">nodeElement</a> <a href="#ws">ws</a>* )*</td>
</tr>
<tr valign="top">
<td><a href="#nodeElement">7.2.11</a> <a href="#nodeElement">nodeElement</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#nodeElementURIs">nodeElementURIs</a><br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set((<a href="#idAttr">idAttr</a> | <a href="#nodeIdAttr">nodeIdAttr</a> | <a href="#aboutAttr">aboutAttr</a> )?, <a href="#bagIdAttr">bagIdAttr</a>?, <a href="#propertyAttr">propertyAttr</a>*))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#ws">7.2.12</a> <a href="#ws">ws</a></td> <td>A <a href="#section-text-node">text event</a> matching white space
defined by <a href="#ref-xml">[XML]</a> definition <em>White Space</em>
Rule [3] <a href="http://www.w3.org/TR/2000/REC-xml-20001006#NT-S">S</a>
in section
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-common-syn">Common Syntactic Constructs</a></td>
</tr>
<tr valign="top">
<td><a href="#propertyEltList">7.2.13</a> <a href="#propertyEltList">propertyEltList</a></td> <td><a href="#ws">ws</a>* (<a href="#propertyElt">propertyElt</a> <a href="#ws">ws</a>* ) *</td>
</tr>
<tr valign="top">
<td><a href="#propertyElt">7.2.14</a> <a href="#propertyElt">propertyElt</a></td> <td><a href="#resourcePropertyElt">resourcePropertyElt</a> |
<a href="#literalPropertyElt">literalPropertyElt</a> |
<a href="#parseTypeLiteralPropertyElt">parseTypeLiteralPropertyElt</a> |
<a href="#parseTypeResourcePropertyElt">parseTypeResourcePropertyElt</a> |
<a href="#parseTypeCollectionPropertyElt">parseTypeCollectionPropertyElt</a> |
<a href="#parseTypeOtherPropertyElt">parseTypeOtherPropertyElt</a> |
<a href="#emptyPropertyElt">emptyPropertyElt</a></td>
</tr>
<tr valign="top">
<td><a href="#resourcePropertyElt">7.2.15</a> <a href="#resourcePropertyElt">resourcePropertyElt</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),
<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?))<br />
<a href="#ws">ws</a>* <a href="#nodeElement">nodeElement</a> <a href="#ws">ws</a>*<br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#literalPropertyElt">7.2.16</a> <a href="#literalPropertyElt">literalPropertyElt</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),
<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#datatypeAttr">datatypeAttr</a>?))<br />
<a href="#section-text-node">text()</a><br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#parseTypeLiteralPropertyElt">7.2.17</a> <a href="#parseTypeLiteralPropertyElt">parseTypeLiteralPropertyElt</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),
<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#parseLiteral">parseLiteral</a>))<br />
<a href="#literal">literal</a><br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#parseTypeResourcePropertyElt">7.2.18</a> <a href="#parseTypeResourcePropertyElt">parseTypeResourcePropertyElt</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),
<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#parseResource">parseResource</a>))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#parseTypeCollectionPropertyElt">7.2.19</a> <a href="#parseTypeCollectionPropertyElt">parseTypeCollectionPropertyElt</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),
<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#parseCollection">parseCollection</a>))<br />
<a href="#nodeElementList">nodeElementList</a><br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#parseTypeOtherPropertyElt">7.2.20</a> <a href="#parseTypeOtherPropertyElt">parseTypeOtherPropertyElt</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),
<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#parseOther">parseOther</a>))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#emptyPropertyElt">7.2.21</a> <a href="#emptyPropertyElt">emptyPropertyElt</a></td> <td>start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),
<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, ( <a href="#resourceAttr">resourceAttr</a> | <a href="#nodeIdAttr">nodeIdAttr</a> )?, <a href="#bagIdAttr">bagIdAttr</a>?, <a href="#propertyAttr">propertyAttr</a>*))<br />
end-element()</td>
</tr>
<tr valign="top">
<td><a href="#idAttr">7.2.22</a> <a href="#idAttr">idAttr</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:ID</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#rdf-id">rdf-id</a>)</td>
</tr>
<tr valign="top">
<td><a href="#nodeIdAttr">7.2.23</a> <a href="#nodeIdAttr">nodeIdAttr</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:nodeID</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#rdf-id">rdf-id</a>)</td>
</tr>
<tr valign="top">
<td><a href="#aboutAttr">7.2.24</a> <a href="#aboutAttr">aboutAttr</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:about</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#URI-reference">URI-reference</a>)</td>
</tr>
<tr valign="top">
<td><a href="#bagIdAttr">7.2.25</a> <a href="#bagIdAttr">bagIdAttr</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:bagID</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#rdf-id">rdf-id</a>)</td>
</tr>
<tr valign="top">
<td><a href="#propertyAttr">7.2.26</a> <a href="#propertyAttr">propertyAttr</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <a href="#propertyAttributeURIs">propertyAttributeURIs</a>,
<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#anyString">anyString</a>)</td>
</tr>
<tr valign="top">
<td><a href="#resourceAttr">7.2.27</a> <a href="#resourceAttr">resourceAttr</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:resource</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#URI-reference">URI-reference</a>)</td>
</tr>
<tr valign="top">
<td><a href="#datatypeAttr">7.2.28</a> <a href="#datatypeAttr">datatypeAttr</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:datatype</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#URI-reference">URI-reference</a>)</td>
</tr>
<tr valign="top">
<td><a href="#parseLiteral">7.2.29</a> <a href="#parseLiteral">parseLiteral</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:parseType</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == "Literal")</td>
</tr>
<tr valign="top">
<td><a href="#parseResource">7.2.30</a> <a href="#parseResource">parseResource</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:parseType</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == "Resource")</td>
</tr>
<tr valign="top">
<td><a href="#parseCollection">7.2.31</a> <a href="#parseCollection">parseCollection</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:parseType</code>,
<a href="#eventterm-attribute-string-value">string-value</a> == "Collection")</td>
</tr>
<tr valign="top">
<td><a href="#parseOther">7.2.32</a> <a href="#parseOther">parseOther</a></td> <td>attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:parseType</code>,
<a
href="#eventterm-attribute-string-value">string-value</a> == <a href="#anyString">anyString</a> - ("Resource" | "Literal") )</td>
</tr>
<tr valign="top">
<td><a href="#URI-reference">7.2.33</a> <a href="#URI-reference">URI-reference</a></td> <td>An attribute <a href="#eventterm-attribute-string-value" class="termref"><span class="arrow">·</span>string-value<span class="arrow">·</span></a> interpreted as an <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>.</td>
</tr>
<tr valign="top">
<td><a href="#literal">7.2.34</a> <a href="#literal">literal</a></td> <td>Any XML element content that is allowed according to
<a href="#ref-xml">[XML]</a> definition <em>Content of Elements</em>
Rule [43]
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#NT-content">content</a>.
in section
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-starttags">3.1 Start-Tags, End-Tags, and Empty-Element Tags</a></td>
</tr>
<tr valign="top">
<td><a href="#rdf-id">7.2.35</a> <a href="#rdf-id">rdf-id</a></td> <td>An attribute <a href="#eventterm-attribute-string-value" class="termref"><span class="arrow">·</span>string-value<span class="arrow">·</span></a>
matching any legal
<a href="#ref-namespaces">[XML-NS]</a> token
<a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a></td>
</tr>
</table>
</div></div>
<h3><a id="section-grammar-productions" name="section-grammar-productions">7.2 Grammar Productions</a></h3>
<h4><a id="start" name="start">7.2.1 Grammar start</a></h4>
<p>If the RDF/XML is a standalone XML document
(known by having been given the <a href="#section-MIME-Type">RDF MIME Type</a>)
then the grammar starts with <a href="#section-root-node">Root Event</a>&#160;
<a href="#doc">doc</a>.</p>
<p>If the content is known to be RDF/XML by context, such as when
RDF/XML is embedded inside other XML content, then the grammar
can either start
at <a href="#section-element-node">Element Event</a>&#160;
<a href="#RDF">RDF</a>
(only when an element is legal at that point in the XML)
or at production <a href="#nodeElementList">nodeElementList</a>
(only when element content is legal, since this is a list of elements).
For such embedded RDF/XML, the
<a href="#eventterm-element-base-uri" class="termref"><span class="arrow">·</span>base-uri<span class="arrow">·</span></a>
value on the outermost element must be initialized from the containing
XML since no
<a href="#section-root-node">Root Event</a>&#160; will be available.
Note that if such embedding occurs, the grammar may be entered
several times but no state is expected to be preserved.
</p>
<h4><a id="coreSyntaxTerms" name="coreSyntaxTerms">7.2.2 Production coreSyntaxTerms</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<code>rdf:RDF</code> | <code>rdf:ID</code> | <code>rdf:about</code> | <code>rdf:bagID</code> | <code>rdf:parseType</code> | <code>rdf:resource</code> | <code>rdf:nodeID</code> | <code>rdf:datatype</code>
</p></div></div>
<p>A subset of the syntax terms from the RDF Namespace in
<a href="#section-Namespace">section 5.1</a>
which are used in RDF/XML.
</p>
<h4><a id="syntaxTerms" name="syntaxTerms">7.2.3 Production syntaxTerms</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<a href="#coreSyntaxTerms">coreSyntaxTerms</a> | <code>rdf:Description</code> | <code>rdf:li</code>
</p></div></div>
<p>All the syntax terms from the RDF Namespace in
<a href="#section-Namespace">section 5.1</a>
which are used in the RDF/XML.
</p>
<h4><a id="oldTerms" name="oldTerms">7.2.4 Production oldTerms</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<code>rdf:aboutEach</code> | <code>rdf:aboutEachPrefix</code>
</p></div></div>
<p>These are the names from the <a href="#section-Namespace">RDF Namespace</a>
that have been withdrawn from the language. See the resolutions of the
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-aboutEach-on-object">rdfms-aboutEach-on-object</a> and
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-abouteachprefix">rdfms-abouteachprefix</a>
issues for further information.
</p>
<div class="note"><p><strong>Error Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-abouteach/error001.rdf">error001.rdf</a> and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-abouteach/error002.rdf">error002.rdf</a>
</p></div>
<div class="note"><p><strong>Note:</strong>
The Working Group invites feedback from the community on the effects
of the removal of these terms on existing implementations and
documents and on the costs and benefits of adopting a new namespace
URI to reflect this change (currently not proposed by the Working
Group).
</p></div>
<h4><a id="nodeElementURIs" name="nodeElementURIs">7.2.5 Production nodeElementURIs</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<a href="#anyURI">anyURI</a> - ( <a href="#coreSyntaxTerms">coreSyntaxTerms</a> | <code>rdf:li</code> | <a href="#oldTerms">oldTerms</a> )
</p></div></div>
<p>The <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a> that are allowed on node elements.</p>
<h4><a id="propertyElementURIs" name="propertyElementURIs">7.2.6 Production propertyElementURIs</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<a href="#anyURI">anyURI</a> - ( <a href="#coreSyntaxTerms">coreSyntaxTerms</a> | <code>rdf:Description</code> | <a href="#oldTerms">oldTerms</a> )
</p></div></div>
<p>The URIs that are allowed on property elements.</p>
<h4><a id="propertyAttributeURIs" name="propertyAttributeURIs">7.2.7 Production propertyAttributeURIs</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<a href="#anyURI">anyURI</a> - ( <a href="#coreSyntaxTerms">coreSyntaxTerms</a> | <code>rdf:Description</code> | <code>rdf:li</code> | <a href="#oldTerms">oldTerms</a> )
</p></div></div>
<p>The <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI References</a> that are allowed on property attributes.</p>
<h4><a id="doc" name="doc">7.2.8 Production doc</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
root(<a href="#eventterm-root-document-element">document-element</a> == <a href="#RDF">RDF</a>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-root-children">children</a> == list(<a href="#RDF">RDF</a>))
</p></div></div>
<h4><a id="RDF" name="RDF">7.2.9 Production RDF</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <code>rdf:RDF</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set())<br />
<a href="#nodeElementList">nodeElementList</a><br />
end-element()
</p></div></div>
<h4><a id="nodeElementList" name="nodeElementList">7.2.10 Production nodeElementList</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<a href="#ws">ws</a>* (<a href="#nodeElement">nodeElement</a> <a href="#ws">ws</a>* )*
</p></div></div>
<h4><a id="description" name="description"></a><a id="typedNode" name="typedNode"></a>
<a id="nodeElement" name="nodeElement">7.2.11 Production nodeElement</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#nodeElementURIs">nodeElementURIs</a><br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set((<a href="#idAttr">idAttr</a> | <a href="#nodeIdAttr">nodeIdAttr</a> | <a href="#aboutAttr">aboutAttr</a> )?, <a href="#bagIdAttr">bagIdAttr</a>?, <a href="#propertyAttr">propertyAttr</a>*))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end-element()
</p></div></div>
<p>For node element <em>e</em>, the processing of some of the attributes
has to be done before other work such as dealing with children events
or other attributes. These can be processed in any order:</p>
<ul>
<li>If there is an attribute <em>a</em> with
<em>a</em>.<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:ID</code>, then
<em>e</em>.<a href="#eventterm-element-subject">subject</a> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>))).</li>
<li>If there is an attribute <em>a</em> with
<em>a</em>.<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:nodeID</code>, then
<em>e</em>.<a href="#eventterm-element-subject">subject</a> := bnodeid(<a href="#eventterm-identifier-identifier">identifier</a>:=<em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>).</li>
<li>If there is an attribute <em>a</em> with
<em>a</em>.<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:about</code> then
<em>e</em>.<a href="#eventterm-element-subject">subject</a> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>)).</li>
</ul>
<p>If <em>e</em>.<a href="#eventterm-element-subject">subject</a> is empty,
then <em>e</em>.<a href="#eventterm-element-subject">subject</a> := bnodeid(<a href="#eventterm-identifier-identifier">identifier</a> := generated-blank-node-id()).</p>
<p>The following can then be performed in any order:</p>
<ul>
<li><a id="nodeElementStatement1" name="nodeElementStatement1">S1</a> If <em>e</em>.<a href="#eventterm-element-URI">URI</a> != <code>rdf:Description</code>
then the following statement is added to the graph:
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; .</code>
</p></div></div>
</li>
<li><a id="nodeElementStatement2" name="nodeElementStatement2">S2</a> If there is an attribute <em>a</em>
in <a href="#propertyAttr">propertyAttr</a> with
<em>a</em>.<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:type</code>
then the following statement is added to the graph:
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;<em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>&gt; .</code>
</p></div></div>
</li>
<li><a id="nodeElementStatement3" name="nodeElementStatement3">S3</a> For each attribute <em>a</em> matching
<a href="#propertyAttr">propertyAttr</a> (and not <code>rdf:type</code>)
then <em>o</em> := literal(<a href="#eventterm-literal-literal-value">literal-value</a> := <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>, <a href="#eventterm-literal-literal-language">literal-language</a> := <em>e</em>.<a href="#eventterm-element-language">language</a>)
and the following statement is added to the graph:
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>a</em>.<a href="#eventterm-attribute-URI">URI</a>&gt; <em>o</em>.<a href="#eventterm-literal-string-value">string-value</a> .</code>
</p></div></div>
</li>
<li><a id="nodeElementStatement4" name="nodeElementStatement4">S4</a> Handle the
<a href="#propertyEltList">propertyEltList</a> children events
in document order.</li>
</ul>
<p>If an attribute <em>a</em> with
<em>a</em>.<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:bagID</code>
is present,
<em>n</em> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>)))
then in any order:</p>
<ul>
<li><p><a id="nodeElementStatement5" name="nodeElementStatement5">S5</a> Add the following statement to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag&gt; .</code>
</p></div></div>
</li>
<li>
<p>For the generated statements above
(excluding <a href="#nodeElementStatement5">S5</a>)
in the following order</p>
<ol>
<li><a href="#nodeElementStatement1">S1</a></li>
<li>Statements from <a href="#nodeElementStatement2">S2</a> and <a href="#nodeElementStatement3">S3</a> in any order</li>
<li>Statements generated by the <a href="#propertyEltList">propertyEltList</a> children by <a href="#nodeElementStatement4">S4</a> in document order</li>
</ol>
<p>If the statement was generated by
<a href="#nodeElementStatement4">S4</a> from a
<a href="#propertyElt">propertyElt</a>
and has an existing identifier
<em>e</em>.<a href="#eventterm-element-subject">subject</a>
then <em>s</em> := <em>e</em>.<a href="#eventterm-element-subject">subject</a>.
Otherwise
<em>s</em> := bnodeid(<a href="#eventterm-identifier-identifier">identifier</a> := generated-blank-node-id())
</p>
<p>Then reify the statement with event <em>s</em>
using the reification rules in
<a href="#section-Reification">section 7.3</a>
and apply the bag expansion rules in
<a href="#section-Bag-Expand">section 7.5</a>
on event <em>n</em> to give a URI <em>u</em>. Then
the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>u</em>&gt; <em>s</em>.<a href="#eventterm-identifier-string-value">string-value</a> .</code>
</p></div></div>
</li>
</ul>
<h4><a id="ws" name="ws">7.2.12 Production ws</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
A <a href="#section-text-node">text event</a> matching white space
defined by <a href="#ref-xml">[XML]</a> definition <em>White Space</em>
Rule [3] <a href="http://www.w3.org/TR/2000/REC-xml-20001006#NT-S">S</a>
in section
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-common-syn">Common Syntactic Constructs</a>
</p></div></div>
<h4><a id="propertyEltList" name="propertyEltList">7.2.13 Production propertyEltList</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<a href="#ws">ws</a>* (<a href="#propertyElt">propertyElt</a> <a href="#ws">ws</a>* ) *
</p></div></div>
<h4><a id="propertyElt" name="propertyElt">7.2.14 Production propertyElt</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
<a href="#resourcePropertyElt">resourcePropertyElt</a> |
<a href="#literalPropertyElt">literalPropertyElt</a> |
<a href="#parseTypeLiteralPropertyElt">parseTypeLiteralPropertyElt</a> |
<a href="#parseTypeResourcePropertyElt">parseTypeResourcePropertyElt</a> |
<a href="#parseTypeCollectionPropertyElt">parseTypeCollectionPropertyElt</a> |
<a href="#parseTypeOtherPropertyElt">parseTypeOtherPropertyElt</a> |
<a href="#emptyPropertyElt">emptyPropertyElt</a>
</p></div></div>
<p>If element <em>e</em> has
<em>e</em>.<a href="#eventterm-element-URI">URI</a> =
<code>rdf:li</code> then apply the list expansion rules on element <em>e</em>.parent in
<a href="#section-List-Expand">section 7.4</a>
to give a new URI <em>u</em> and
<em>e</em>.<a href="#eventterm-element-URI">URI</a> := <em>u</em>.
</p>
<p>NOTE: The action of this production must be done before the
actions of any sub-matches (<a
href="#resourcePropertyElt">resourcePropertyElt</a> ... <a href="#emptyPropertyElt">emptyPropertyElt</a>).
Alternatively the result must be equivalent to as if it this action
was performed first, such as performing as the first
action of all of the sub-matches.
</p>
<h4><a id="resourcePropertyElt" name="resourcePropertyElt">7.2.15 Production resourcePropertyElt</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?))<br />
<a href="#ws">ws</a>* <a href="#nodeElement">nodeElement</a> <a href="#ws">ws</a>*<br />
end-element()
</p></div></div>
<p>For element <em>e</em>, and the single contained nodeElement <em>n</em>
the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
&#160;&#160;<code> <em>e</em>.parent.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; <em>n</em>.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> .</code>
</p></div></div>
<p>If the <code>rdf:ID</code> attribute <em>a</em> is given, the above
statement is reified with
<em>i</em> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>)))
using the reification rules in
<a href="#section-Reification">section 7.3</a>
and <em>e</em>.<a href="#eventterm-element-subject">subject</a> := <em>i</em></p>
<h4><a id="literalPropertyElt" name="literalPropertyElt">7.2.16 Production literalPropertyElt</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#datatypeAttr">datatypeAttr</a>?))<br />
<a href="#section-text-node">text()</a><br />
end-element()
</p></div></div>
<div class="note"><p><strong>Note:</strong>
The empty literal case is defined in production
<a href="#emptyPropertyElt">emptyPropertyElt</a>
</p></div>
<p>For element <em>e</em>, and the text event <em>t</em>.
If the <code>rdf:datatype</code> attribute <em>d</em> is given
then <em>o</em> := typed-literal(<a href="#eventterm-typedliteral-literal-value">literal-value</a> := <em>t</em>.<a href="#eventterm-text-string-value">string-value</a>, <a href="#eventterm-typedliteral-literal-language">literal-language</a> := <em>e</em>.<a href="#eventterm-element-language">language</a>, <a href="#eventterm-typedliteral-literal-datatype">literal-datatype</a> := <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>)
otherwise <em>o</em> := literal(<a href="#eventterm-literal-literal-value">literal-value</a> := <em>t</em>.<a href="#eventterm-text-string-value">string-value</a>, <a href="#eventterm-literal-literal-language">literal-language</a> := <em>e</em>.<a href="#eventterm-element-language">language</a>)
and the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.parent.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; <em>o</em>.<a href="#eventterm-literal-string-value">string-value</a> .</code>
</p></div></div>
<p>If the <code>rdf:ID</code> attribute <em>a</em> is given, the above
statement is reified with
<em>i</em> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>)))
using the reification rules in
<a href="#section-Reification">section 7.3</a>
and <em>e</em>.<a href="#eventterm-element-subject">subject</a> := <em>i</em>.</p>
<h4><a id="parseTypeLiteralPropertyElt" name="parseTypeLiteralPropertyElt">7.2.17 Production parseTypeLiteralPropertyElt</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#parseLiteral">parseLiteral</a>))<br />
<a href="#literal">literal</a><br />
end-element()
</p></div></div>
<p>For element <em>e</em> and the literal <em>l</em>,
then <em>o</em> := typed-literal(<a href="#eventterm-typedliteral-literal-value">literal-value</a> := <em>l</em>.<a href="#eventterm-text-string-value">string-value</a>, <a href="#eventterm-typedliteral-literal-language">literal-language</a> := <em>e</em>.<a href="#eventterm-element-language">language</a>, <a href="#eventterm-typedliteral-literal-datatype">literal-datatype</a> := <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral</code> )
and the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.parent.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; <em>o</em>.<a href="#eventterm-typedliteral-string-value">string-value</a> .</code>
</p></div></div>
<div class="note"><p><strong>Test:</strong>
Empty literal case indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test009.rdf">test009.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test009.nt">test009.nt</a>
</p></div>
<p>If the <code>rdf:ID</code> attribute <em>a</em> is given, the above
statement is reified with
<em>i</em> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>)))
using the reification rules in
<a href="#section-Reification">section 7.3</a>
and <em>e</em>.<a href="#eventterm-element-subject">subject</a> := <em>i</em>.</p>
<p>The result of a <a href="#literal">literal</a> from
<code>rdf:parseType="Literal"</code> content is an
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-XMLLiteral">XML Literal</a>.
</p>
<p>This specification allows some freedom to choose exactly what
string is used as the lexical form of an XML Literal. Whatever
string is used, it MUST correspond to an XML document when enclosed
within a start and end element tag, and its canonicalization (without
comments, as defined in
<a href="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/">Exclusive XML Canonicalization</a> [<a href="#ref-xml-xc14n">XML-XC14N</a>])
MUST be the same as the same
canonicalization of the literal text <em>l</em>. It is often
acceptable to use <em>l</em> without any changes but this is
incorrect if, for example, <em>l</em> uses entity references or
namespace prefixes defined in the outer XML document.</p>
<h4><a id="parseTypeResourcePropertyElt" name="parseTypeResourcePropertyElt">7.2.18 Production parseTypeResourcePropertyElt</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#parseResource">parseResource</a>))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end-element()
</p></div></div>
<p>For element <em>e</em> with possibly empty element content <em>c</em>.</p>
<p><em>n</em> := bnodeid(<a href="#eventterm-identifier-identifier">identifier</a> := generated-blank-node-id()).</p>
<p>Add the following statement to the graph:
</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.parent.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; <em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> .</code>
</p></div></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test004.rdf">test004.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test004.nt">test004.nt</a>
</p></div>
<p>If the <code>rdf:ID</code> attribute <em>a</em> is given, the
statement above is reified with
<em>i</em> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>)))
using the reification rules in
<a href="#section-Reification">section 7.3</a>
and <em>e</em>.<a href="#eventterm-element-subject">subject</a> := <em>i</em>.</p>
<p>If the element content <em>c</em> is not empty, then use event
<em>n</em> to create a new sequence of events as follows:</p>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> := <code>rdf:Description</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-subject">subject</a> := <em>n</em>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> := set())<br />
<em>c</em><br />
end-element()
</p></div></div>
<p>Then
process the resulting sequence using production
<a href="#nodeElementList">nodeElement</a>.</p>
<h4><a id="parseTypeCollectionPropertyElt" name="parseTypeCollectionPropertyElt">7.2.19 Production parseTypeCollectionPropertyElt</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#parseCollection">parseCollection</a>))<br />
<a href="#nodeElementList">nodeElementList</a><br />
end-element()
</p></div></div>
<p>For element event <em>e</em> with possibly empty
<a href="#nodeElementList">nodeElementList</a> <em>l</em>. Set
<em>s</em>:=list().</p>
<p>For each element event <em>f</em> in <em>l</em>,
<em>n</em> := bnodeid(<a href="#eventterm-identifier-identifier">identifier</a> := generated-blank-node-id()) and append <em>n</em> to
<em>s</em> to give a sequence of events.</p>
<p>If <em>s</em> is not empty, <em>n</em> is the first event identifier in
<em>s</em> and the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.parent.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; <em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> .</code>
</p></div></div>
<p>otherwise the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.parent.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#nil&gt; .</code>
</p></div></div>
<p>If the <code>rdf:ID</code> attribute <em>a</em> is given, the above
statement is reified with
<em>i</em> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>)))
using the reification rules in
<a href="#section-Reification">section 7.3</a>.
</p>
<p>If <em>s</em> is empty, no further work is performed.</p>
<p>For each event <em>n</em> in <em>s</em>,
the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#List&gt; .</code>
</p></div></div>
<p>For each event <em>n</em> in <em>s</em> and the
corresponding element event <em>f</em> in <em>l</em>, the following
statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code> <em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#first&gt; <em>f</em>.<a href="#eventterm-identifier-string-value">string-value</a> .</code>
</p></div></div>
<p>For each consecutive, overlapping pairs of events
(<em>n</em>, <em>o</em>) in <em>s</em>, the following statement is
added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#rest&gt; <em>o</em>.<a href="#eventterm-identifier-string-value">string-value</a> .</code>
</p></div></div>
<p>If <em>s</em> is not empty, <em>n</em> is the last event identifier
in <em>s</em>, the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#rest&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#nil&gt; .</code>
</p></div></div>
<h4><a id="parseTypeOtherPropertyElt" name="parseTypeOtherPropertyElt">7.2.20 Production parseTypeOtherPropertyElt</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, <a href="#parseOther">parseOther</a>))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end-element()
</p></div></div>
<p>All <code>rdf:parseType</code> attribute values other than the strings
"Resource", "Literal" or "Collection" are treated as if the value was
"Literal". This production matches and acts as if production
<a href="#parseTypeLiteralPropertyElt">parseTypeLiteralPropertyElt</a>
was matched.
No extra triples are generated for other <code>rdf:parseType</code> values.
</p>
<h4><a id="emptyPropertyElt" name="emptyPropertyElt">7.2.21 Production emptyPropertyElt</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
start-element(<a href="#eventterm-element-URI">URI</a> == <a href="#propertyElementURIs">propertyElementURIs</a> ),<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-element-attributes">attributes</a> == set(<a href="#idAttr">idAttr</a>?, ( <a href="#resourceAttr">resourceAttr</a> | <a href="#nodeIdAttr">nodeIdAttr</a> )?, <a href="#bagIdAttr">bagIdAttr</a>?, <a href="#propertyAttr">propertyAttr</a>*))<br />
end-element()
</p></div></div>
<ul>
<li>
<p>If there are no attributes <strong>or</strong> only the
optional <code>rdf:ID</code> attribute <em>i</em>
then <em>o</em> := literal(<a href="#eventterm-literal-literal-value">literal-value</a>:="", <a href="#eventterm-literal-literal-language">literal-language</a> := <em>e</em>.<a href="#eventterm-element-language">language</a>)
and the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.parent.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; <em>o</em>.<a href="#eventterm-literal-string-value">string-value</a> .</code>
</p></div></div>
<p>and then if <em>i</em> is given, the above statement is reified with
uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>i</em>.<a href="#eventterm-attribute-string-value">string-value</a>)))
using the reification rules in
<a href="#section-Reification">section 7.3</a>.</p>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test002.rdf">test002.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test002.nt">test002.nt</a>
</p></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test005.rdf">test005.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test005.nt">test005.nt</a>
</p></div>
</li>
<li>
<p>Otherwise</p>
<ul>
<li>If <code>rdf:resource</code> attribute <em>i</em> is present, then
<em>r</em> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, <em>i</em>.<a href="#eventterm-attribute-string-value">string-value</a>))
</li>
<li>If <code>rdf:nodeID</code> attribute <em>i</em> is present, then
<em>r</em> := bnodeid(<a href="#eventterm-identifier-identifier">identifier</a> := <em>i</em>.<a href="#eventterm-attribute-string-value">string-value</a>)
</li>
<li>If neither,
<em>r</em> := bnodeid(<a href="#eventterm-identifier-identifier">identifier</a> := generated-blank-node-id())
</li>
</ul>
<p>If optional <code>rdf:bagID</code> attribute <em>b</em> is given,
<em>n</em> := uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>b</em>.<a href="#eventterm-attribute-string-value">string-value</a>)))</p>
<p>The following are done in any order:</p>
<ul>
<li><p>For all <a href="#propertyAttr">propertyAttr</a>
attributes <em>a</em> (in any order)</p>
<ul>
<li><p>If <em>a</em>.<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:type</code>
then the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>r</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;<em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>&gt; .</code>
</p></div></div>
</li>
<li><p>Otherwise
<em>o</em> := literal(<a href="#eventterm-literal-literal-value">literal-value</a> := <em>a</em>.<a href="#eventterm-attribute-string-value">string-value</a>, <a href="#eventterm-literal-literal-language">literal-language</a> := <em>e</em>.<a href="#eventterm-element-language">language</a>)
and the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>r</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>a</em>.<a href="#eventterm-attribute-URI">URI</a>&gt; <em>o</em>.<a href="#eventterm-literal-string-value">string-value</a> .</code>
</p></div></div>
</li>
</ul>
<p>If event <em>n</em> was created, then
for each statement above:
<em>s</em> := bnodeid(<a href="#eventterm-identifier-identifier">identifier</a> := generated-blank-node-id()),
reify the statement with event <em>s</em>
using the reification rules in
<a href="#section-Reification">section 7.3</a>,
apply the bag expansion rules in
<a href="#section-Bag-Expand">section 7.5</a>
on event <em>n</em> to give URI <em>u</em> and
add the following statement is added to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>u</em>&gt; <em>s</em>.<a href="#eventterm-identifier-string-value">string-value</a>; .</code>
</p></div></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test013.rdf">test013.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test013.nt">test013.nt</a>
</p></div>
<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test014.rdf">test014.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test014.nt">test014.nt</a>
</p></div>
</li>
<li><p>Add the following statement to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>e</em>.parent.<a href="#eventterm-element-subject">subject</a>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;<em>e</em>.<a href="#eventterm-element-URI">URI</a>&gt; <em>r</em>.<a href="#eventterm-identifier-string-value">string-value</a> .</code>
</p></div></div>
<p>and then if <code>rdf:ID</code> attribute <em>i</em> is given, the above statement is
reified with
uri(<a href="#eventterm-identifier-identifier">identifier</a> := resolve(<em>e</em>, concat("#", <em>i</em>.<a href="#eventterm-identifier-string-value">string-value</a>)))
using the reification rules in
<a href="#section-Reification">section 7.3</a>.</p>
</li>
<li><p>If event <em>n</em> was created, add the
following statement to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>n</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag&gt; .</code>
</p></div></div>
</li>
</ul>
</li>
</ul>
<!-- idAboutAttr one has gone; id is closest thing replacing it -->
<h4><a id="idAboutAttr" name="idAboutAttr"></a>
<a id="idAttr" name="idAttr">7.2.22 Production idAttr</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:ID</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#rdf-id">rdf-id</a>)
</p></div></div>
<p><strong>Constraint:</strong>: <a href="#constraint-id">constraint-id</a>
applies to the values of <code>rdf:ID</code> attributes</p>
<h4><a id="nodeIdAttr" name="nodeIdAttr">7.2.23 Production nodeIdAttr</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:nodeID</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#rdf-id">rdf-id</a>)
</p></div></div>
<h4><a id="aboutAttr" name="aboutAttr">7.2.24 Production aboutAttr</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:about</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#URI-reference">URI-reference</a>)
</p></div></div>
<h4><a id="bagIdAttr" name="bagIdAttr">7.2.25 Production bagIdAttr</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:bagID</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#rdf-id">rdf-id</a>)
</p></div></div>
<p><strong>Constraint:</strong>: <a href="#constraint-id">constraint-id</a>
applies to the values of <code>rdf:bagID</code> attributes</p>
<h4><a id="propAttr" name="propAttr"></a><a id="typeAttr" name="typeAttr"></a>
<a id="propertyAttr" name="propertyAttr">7.2.26 Production propertyAttr</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <a href="#propertyAttributeURIs">propertyAttributeURIs</a>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#anyString">anyString</a>)
</p></div></div>
<h4><a id="resourceAttr" name="resourceAttr">7.2.27 Production resourceAttr</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:resource</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#URI-reference">URI-reference</a>)
</p></div></div>
<h4><a id="datatypeAttr" name="datatypeAttr">7.2.28 Production datatypeAttr</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:datatype</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == <a href="#URI-reference">URI-reference</a>)
</p></div></div>
<h4><a id="parseLiteral" name="parseLiteral">7.2.29 Production parseLiteral</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:parseType</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == "Literal")
</p></div></div>
<h4><a id="parseResource" name="parseResource">7.2.30 Production parseResource</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:parseType</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == "Resource")
</p></div></div>
<h4><a id="parseCollection" name="parseCollection">7.2.31 Production parseCollection</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:parseType</code>,<br />
&#160;&#160;&#160;&#160;<a href="#eventterm-attribute-string-value">string-value</a> == "Collection")
</p></div></div>
<h4><a id="parseOther" name="parseOther">7.2.32 Production parseOther</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#eventterm-attribute-URI">URI</a> == <code>rdf:parseType</code>,<br />
&#160;&#160;&#160;&#160;<a
href="#eventterm-attribute-string-value">string-value</a> == <a href="#anyString">anyString</a> - ("Resource" | "Literal") )
</p></div></div>
<h4><a id="URI-reference" name="URI-reference">7.2.33 Production URI-reference</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
An attribute <a href="#eventterm-attribute-string-value" class="termref"><span class="arrow">·</span>string-value<span class="arrow">·</span></a> interpreted as an <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a>.
</p></div></div>
<h4><a id="literal" name="literal">7.2.34 Production literal</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
Any XML element content that is allowed according to
<a href="#ref-xml">[XML]</a> definition <em>Content of Elements</em>
Rule [43]
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#NT-content">content</a>.
in section
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-starttags">3.1 Start-Tags, End-Tags, and Empty-Element Tags</a>
</p></div></div>
<h4><a id="rdf-id" name="rdf-id">7.2.35 Production rdf-id</a></h4>
<div class="productionOuter"><div class="productionInner"><p>
An attribute <a href="#eventterm-attribute-string-value" class="termref"><span class="arrow">·</span>string-value<span class="arrow">·</span></a>
matching any legal
<a href="#ref-namespaces">[XML-NS]</a> token
<a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
</p></div></div>
<h3><a id="section-Reification" name="section-Reification">7.3 Reification Rules</a></h3>
<p>For the given event <em>r</em> and
the statement with terms <em>s</em>, <em>p</em> and <em>o</em>
corresponding to the N-Triples:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>s</em> <em>p</em> <em>o</em> .</code>
</p></div></div>
<p>add the following statements to the graph:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<code><em>r</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#subject&gt; <em>s</em> .</code><br />
<code><em>r</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate&gt; <em>p</em> .</code><br />
<code><em>r</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#object&gt; <em>o</em> .</code><br />
<code><em>r</em>.<a href="#eventterm-identifier-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement&gt; .</code><br />
</p></div></div>
<h3><a id="section-List-Expand" name="section-List-Expand">7.4 List Expansion Rules</a></h3>
<p>For the given element <em>e</em>, create a new <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> <em>u</em> :=
concat("http://www.w3.org/1999/02/22-rdf-syntax-ns#_",
<em>e</em>.<a href="#eventterm-element-liCounter">li-counter</a>),
increment the
<em>e</em>.<a href="#eventterm-element-liCounter">li-counter</a>
property by 1 and return <em>u</em>.</p>
<h3><a id="section-Bag-Expand" name="section-Bag-Expand">7.5 Bag Expansion Rules</a></h3>
<p>For the given element <em>e</em>, create a new <a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-URI-reference">RDF URI Reference</a> <em>u</em> :=
concat("http://www.w3.org/1999/02/22-rdf-syntax-ns#_",
<em>e</em>.<a href="#eventterm-element-bag-li-counter">bag-li-counter</a>),
increment the
<em>e</em>.<a href="#eventterm-element-bag-li-counter">bag-li-counter</a>
property by 1 and return <em>u</em>.</p>
<h2>
<a id="section-Serialising" name="section-Serialising">8 Serializing an RDF Graph to RDF/XML</a>
</h2>
<p>There are some
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-graph">RDF Graphs</a>
as defined in the
<a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/">RDF Concepts and Abstract Syntax</a> Working Draft.
that cannot be serialized in RDF/XML. These are those that:</p>
<dl>
<dt>Use property names that cannot be turned into XML namespace-qualified names.<br /></dt>
<dd>An XML namespace-qualified name
(<a href="http://www.w3.org/TR/REC-xml-names/#dt-qname">QName</a>)
has restrictions on the legal characters such that not all property URIs
can be expressed as these names.
It is recommended that implementors of RDF serializers, in order to
break a URI into a namespace name and a local name, split it after
the last XML non-<a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
character, ensuring that the first character of the name is a
<a href="http://www.w3.org/TR/REC-xml#NT-Letter">Letter</a> or '_'.
If the URI ends in a
non-<a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
character then throw a "this graph cannot be serialized in RDF/XML"
exception or error.
</dd>
<dt>Use inappropriate reserved names as properties<br /></dt>
<dd>For example, a property with the same URI as any of the
<a href="#syntaxTerms">syntaxTerms</a> production.
</dd>
</dl>
<p>A more detailed discussion of the issues of serializing the RDF Graph
to RDF/XML is given in <a href="#ref-unparsing">[UNPARSING]</a>.
This describes using the original syntax without the subsequently
added <code>rdf:nodeID</code> attribute that now allows all graphs
with blank nodes to be serialized.</p>
<h2>
<a id="section-rdf-in-HTML" name="section-rdf-in-HTML">9 Using RDF/XML with HTML and XHTML</a>
</h2>
<p>If RDF/XML is embedded inside HTML or XHTML this can
add many new elements and attributes, many of which will not be
in the appropriate DTD. This causes validation against the DTD to fail.
The obvious solution of changing or extending the DTD is not practical
for most uses. This problem has been analyzed extensively by Sean B. Palmer in
<a href="http://infomesh.net/2002/rdfinhtml/">RDF in HTML: Approaches</a><a href="#ref-rdf-in-xhtml">[RDF-IN-XHTML]</a>
and it concludes that there is no single embedding
method that satisfies all applications and remains simple.
</p>
<p>The recommended approach is to not embed RDF/XML in HTML/XHTML but
rather to use <code>&lt;link&gt;</code> element in the <code>&lt;head&gt;</code>
element of the HTML/HTML to point at a separate RDF/XML document.
This has been used for several years by the
<a href="http://www.dublincore.org/">Dublin Core Metadata Initiative (DCMI)</a>
on its Web site.</p>
<p>To use this technique, the <code>&lt;link&gt;</code> element
<code>href</code> should point at the URI of the RDF/XML content
and the <code>type</code> attribute should be used with the value of
<code>"application/rdf+xml"</code>, the proposed MIME Type for
RDF/XML, see <a href="#section-MIME-Type">Section 4</a></p>
<p>The value of the <code>rel</code> attribute may also be set to
indicate the relationship; this is an application dependent value.
The DCMI has used and recommended <code>rel="meta"</code> when linking
in <a href="http://www.ietf.org/rfc/rfc2731.txt">RFC 2731 - Encoding Dublin Core Metadata in HTML</a><a href="#ref-rfc2731">[RFC-2731]</a> however
<code>rel="alternative"</code> may also be appropriate.
See
<a href="http://www.w3.org/TR/html401/types.html#type-links">HTML 4.01 link types</a>
and
<a href="http://www.w3.org/TR/xhtml-modularization/abstraction.html#dt_LinkTypes">XHTML Modularization - LinkTypes</a>
for further information.</p>
<h2 class="nonum">
<a id="section-Acknowledgments" name="section-Acknowledgments"></a>10 Acknowledgments (Informative)
</h2>
<p>The following people provided valuable contributions to the document:</p>
<ul>
<li>Dan Brickley, W3C/ILRT</li>
<li>Jeremy Carroll, HP Labs Bristol</li>
<li>Bijan Parsia, MIND Lab at University of Maryland at College Park</li>
</ul>
<p>This document is a product of extended deliberations by the RDF
Core working group, whose members have included: Art Barstow (W3C)
Dave Beckett (ILRT), Dan Brickley (W3C/ILRT), Dan Connolly (W3C),
Jeremy Carroll (Hewlett Packard), Ron Daniel (Interwoven Inc), Bill
dehOra (InterX), Jos De Roo (AGFA), Jan Grant (ILRT), Graham Klyne
(Clearswift and Nine by Nine), Frank Manola (MITRE Corporation),
Brian McBride (Hewlett Packard), Eric Miller (W3C), Stephen
Petschulat (IBM), Patrick Stickler (Nokia), Aaron Swartz (HWG), Mike
Dean (BBN Technologies / Verizon), R. V. Guha (Alpiri Inc), Pat Hayes
(IHMC), Sergey Melnik (Stanford University), Martyn Horner (Profium
Ltd).</p>
<p>This specification also draws upon an earlier RDF Model and Syntax
document edited by Ora Lassilla and Ralph Swick, and RDF Schema
edited by Dan Brickley and R. V. Guha. RDF and RDF Schema Working
group members who contributed to this earlier work are:
Nick Arnett (Verity), Tim Berners-Lee (W3C), Tim Bray (Textuality),
Dan Brickley (ILRT / University of Bristol), Walter Chang (Adobe),
Sailesh Chutani (Oracle), Dan Connolly (W3C), Ron Daniel
(DATAFUSION), Charles Frankston (Microsoft), Patrick Gannon
(CommerceNet), RV Guha (Epinions, previously of Netscape
Communications), Tom Hill (Apple Computer), Arthur van Hoff
(Marimba), Renato Iannella (DSTC), Sandeep Jain (Oracle), Kevin
Jones, (InterMind), Emiko Kezuka (Digital Vision Laboratories), Joe
Lapp (webMethods Inc.), Ora Lassila (Nokia Research Center), Andrew
Layman (Microsoft), Ralph LeVan (OCLC), John McCarthy (Lawrence
Berkeley National Laboratory), Chris McConnell (Microsoft), Murray
Maloney (Grif), Michael Mealling (Network Solutions), Norbert Mikula
(DataChannel), Eric Miller (OCLC), Jim Miller (W3C, emeritus), Frank
Olken (Lawrence Berkeley National Laboratory), Jean Paoli
(Microsoft), Sri Raghavan (Digital/Compaq), Lisa Rein (webMethods
Inc.), Paul Resnick (University of Michigan), Bill Roberts
(KnowledgeCite), Tsuyoshi Sakata (Digital Vision Laboratories), Bob
Schloss (IBM), Leon Shklar (Pencom Web Works), David Singer (IBM),
Wei (William) Song (SISU), Neel Sundaresan (IBM), Ralph Swick (W3C),
Naohiko Uramoto (IBM), Charles Wicksteed (Reuters Ltd.), Misha Wolf
(Reuters Ltd.), Lauren Wood (SoftQuad).
</p>
<h2 class="nonum">
<a id="section-References" name="section-References"></a>11 References
</h2>
<h3>
<a id="section-Normative-References" name="section-Normative-References"></a>Normative References
</h3>
<dl>
<dt>
<a id="ref-rdfms" name="ref-rdfms">[RDF-MS]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">Resource Description Framework (RDF) Model and Syntax Specification</a></cite>, O. Lassila and R. Swick, Editors. World Wide Web Consortium. 22 February 1999. This version is http://www.w3.org/TR/1999/REC-rdf-syntax-19990222. The <a href="http://www.w3.org/TR/REC-rdf-syntax/">latest version of RDF M&amp;S</a> is available at http://www.w3.org/TR/REC-rdf-syntax.
</dd>
<dt>
<a id="ref-xml" name="ref-xml">[XML]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/2000/REC-xml-20001006">Extensible Markup Language (XML) 1.0, Second Edition</a></cite>, T. Bray, J. Paoli, C.M. Sperberg-McQueen and E. Maler, Editors. World Wide Web Consortium. 6 October 2000. This version is http://www.w3.org/TR/2000/REC-xml-20001006. <a href="http://www.w3.org/TR/REC-xml">latest version of XML</a> is available at http://www.w3.org/TR/REC-xml.
</dd>
<dt>
<a id="ref-namespaces" name="ref-namespaces">[XML-NS]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">Namespaces in XML</a></cite>, T. Bray, D. Hollander and A. Layman, Editors. World Wide Web Consortium. 14 January 1999. This version is http://www.w3.org/TR/1999/REC-xml-names-19990114. The <a href="http://www.w3.org/TR/REC-xml-names/">latest version of Namespaces in XML</a> is available at http://www.w3.org/TR/REC-xml-names.
</dd>
<dt>
<a id="ref-xml-infoset" name="ref-xml-infoset">[INFOSET]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/2001/REC-xml-infoset-20011024/">XML Information Set</a></cite>, J. Cowan and R. Tobin, Editors. World Wide Web Consortium. 24 October 2001. This version is http://www.w3.org/TR/2001/REC-xml-infoset-20011024. The <a href="http://www.w3.org/TR/xml-infoset/">latest version of XML Information set</a> is available at http://www.w3.org/TR/xml-infoset.
</dd>
<dt>
<a id="ref-uri" name="ref-uri">[URIS]</a>
</dt>
<dd><cite><a href="http://www.isi.edu/in-notes/rfc2396.txt">RFC 2396 - Uniform Resource Identifiers (URI): Generic Syntax</a></cite>, T. Berners-Lee, R. Fielding and L. Masinter, IETF, August 1998. This document is http://www.isi.edu/in-notes/rfc2396.txt.
</dd>
<dt>
<a id="ref-rdfconcepts" name="ref-rdfconcepts">[RDF-CONCEPTS]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/">Resource Description Framework (RDF): Concepts and Abstract Syntax</a></cite>, G. Klyne, J. Carroll, Editors, World Wide Web Consortium Last Call Working Draft, work in progress, 23 January 2003. This version of the RDF Concepts and Abstract Syntax is http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/. The <a href="http://www.w3.org/TR/rdf-concepts/">latest version of the RDF Concepts and Abstract Syntax</a> is at http://www.w3.org/TR/rdf-concepts/.
</dd>
<dt>
<a id="ref-test-cases" name="ref-test-cases">[RDF-TESTS]</a>
</dt>
<dd><cite><a href="http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/">RDF Test Cases</a></cite>, J. Grant and D. Beckett, Editors, World Wide Web Consortium Last Call Working Draft, work in progress, 23 January 2003. This version of the RDF Test Cases is http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/. The <a href="http://www.w3.org/TR/rdf-testcases/">latest version of the RDF Test Cases</a> is at http://www.w3.org/TR/rdf-testcases/.
</dd>
<dt>
<a id="ref-keywords" name="ref-keywords">[KEYWORDS]</a>
</dt>
<dd>
<cite><a href="http://www.ietf.org/rfc/rfc2119.txt">RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels</a></cite>, S. Bradner, IETF. March 1997. This document is http://www.ietf.org/rfc/rfc2119.txt.
</dd>
<dt>
<a id="ref-rfc3023" name="ref-rfc3023">[RFC-3023]</a>
</dt>
<dd>
<cite><a href="http://www.ietf.org/rfc/rfc3023.txt">RFC 3032 - XML Media Types</a></cite>, M. Murata, S. St.Laurent, D.Kohn, IETF. January 2001. This document is http://www.ietf.org/rfc/rfc3023.txt.
</dd>
<dt>
<a id="ref-rdf-mimetype-id" name="ref-rdf-mimetype-id">[RDF-MIMETYPE-ID]</a>
</dt>
<dd>
<cite>application/rdf+xml Media Type Registration</cite>, Internet-Draft draft-w3c-rdfcore-rdfxml-mediatype-01, A. Swartz, 23 August 2002.
</dd>
<dt>
<a id="ref-xml-base" name="ref-xml-base">[XML-BASE]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML Base</a></cite>, J. Marsh, Editor, W3C Recommendation. World Wide Web Consortium, 27 June 2001. This version of XML Base is http://www.w3.org/TR/2001/REC-xmlbase-20010627. The <a href="http://www.w3.org/TR/xmlbase/">latest version of XML Base</a> is at http://www.w3.org/TR/xmlbase.
</dd>
<dt>
<a id="ref-xml-xc14n" name="ref-xml-xc14n">[XML-XC14N]</a>
</dt>
<dd><cite><a href="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/">Exclusive XML Canonicalization Version 1.0</a></cite>, J. Boyer, D.E. Eastlake 3rd, J. Reagle, Authors/Editors. W3C Recommendation. World Wide Web Consortium, 18 July 2002. This version of Exclusive XML Canonicalization is http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718. The <a href="http://www.w3.org/TR/xml-exc-c14n/">latest version of Canonical XML</a> is at http://www.w3.org/TR/xml-exc-c14n.
</dd>
</dl>
<h3>
<a id="section-Informative-References" name="section-Informative-References"></a>Informational References
</h3>
<dl>
<dt>
<a id="ref-charmod" name="ref-charmod">[CHARMOD]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/2002/WD-charmod-20020220/">Character Model for the World Wide Web 1.0</a></cite>, M. Dürst, F. Yergeau, R. Ishida, M. Wolf, A. Freytag, T Texin, Editors, World Wide Web Consortium Working Draft, work in progress, 20 February 2002. This version of the Character Model is http://www.w3.org/TR/2002/WD-charmod-20020220. The <a href="http://www.w3.org/TR/charmod/">latest version of the Character Model</a> is at http://www.w3.org/TR/charmod.
</dd>
<dt>
<a id="ref-rdf-model" name="ref-rdf-model">[RDF-SEMANTICS]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/2003/WD-rdf-mt-20030123/">RDF Semantics</a></cite>, P. Hayes, Editor. World Wide Web Consortium Last Call Working Draft, work in progress, 23 January 2003. This version of the RDF Semantics is http://www.w3.org/TR/2003/WD-rdf-mt-20030123. The <a href="http://www.w3.org/TR/rdf-mt/">latest version of the RDF Semantics</a> is at http://www.w3.org/TR/rdf-mt.
</dd>
<dt>
<a id="ref-rdfprimer" name="ref-rdfprimer">[RDF-PRIMER]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/2003/WD-rdf-primer-20030123/">RDF Primer</a></cite>, F. Manola, E. Miller, Editors, World Wide Web Consortium last Call Working Draft, work in progress, 23 January 2003. This version of the RDF Primer is http://www.w3.org/TR/2003/WD-rdf-primer-20030123. The <a href="http://www.w3.org/TR/rdf-primer/">latest version of the RDF Primer</a> is at http://www.w3.org/TR/rdf-primer.
</dd>
<dt>
<a id="ref-rdfvocab" name="ref-rdfvocab">[RDF-VOCABULARY]</a>
</dt>
<dd>
<cite><a href="http://www.w3.org/TR/2003/WD-rdf-schema-20030123/">RDF Vocabulary Description Language 1.0: RDF Schema</a></cite>, D. Brickley, R.V. Guha, Editors, World Wide Web Consortium Last Call Working Draft, work in progress, 23 January 2003. This version of the RDF Vocabulary Description Language is http://www.w3.org/TR/2003/WD-rdf-schema-20030123. The <a href="http://www.w3.org/TR/rdf-schema/">latest version of the RDF Vocabulary Description Language</a> is at http://www.w3.org/TR/rdf-schema.
</dd>
<dt>
<a id="ref-stripedrdf" name="ref-stripedrdf">[STRIPEDRDF]</a>
</dt>
<dd><cite><a href="http://www.w3.org/2001/10/stripes/">RDF: Understanding the Striped RDF/XML Syntax</a></cite>, D. Brickley, W3C, 2001. This
document is http://www.w3.org/2001/10/stripes/.
</dd>
<dt>
<a id="ref-xpath" name="ref-xpath">[XPATH]</a>
</dt>
<dd><cite><a href="http://www.w3.org/TR/1999/REC-xpath-19991116">XML Path Language (XPath) Version 1.0</a></cite>, J. Clark and S. DeRose, Editors. World Wide Web Consortium, 16 November 1999. This version of XPath is http://www.w3.org/TR/1999/REC-xpath-19991116. The <a href="http://www.w3.org/TR/xpath">latest version of XPath</a> is at http://www.w3.org/TR/xpath.
</dd>
<dt>
<a id="ref-sax" name="ref-sax">[SAX2]</a>
</dt>
<dd><cite><a href="http://sax.sourceforge.net/">SAX Simple API for XML, version 2</a></cite>, D. Megginson, SourceForge, 5 May 2000. This document is http://sax.sourceforge.net/.</dd>
<dt>
<a id="ref-unparsing" name="ref-unparsing">[UNPARSING]</a>
</dt>
<dd><cite><a href="http://www.hpl.hp.com/techreports/2001/HPL-2001-294.html">Unparsing RDF/XML</a></cite>, J. J. Carroll, HP Labs Technical Report, HPL-2001-294, 2001.
This document is available at http://www.hpl.hp.com/techreports/2001/HPL-2001-294.html.
</dd>
<dt>
<a id="ref-relaxng" name="ref-relaxng">[RELAXNG]</a>
</dt>
<dd><cite><a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">RELAX NG Specification</a></cite>, James Clark and MURATA Makoto, Editors, OASIS Committee Specification, 3 December 2001. This version of RELAX&#160;NG is http://www.oasis-open.org/committees/relax-ng/spec-20011203.html. The <a href="http://www.oasis-open.org/committees/relax-ng/spec.html">latest version of the RELAX NG Specification</a> is at http://www.oasis-open.org/committees/relax-ng/spec.html.</dd>
<dt>
<a id="ref-relaxng-nx" name="ref-relaxng-nx">[RELAXNG-COMPACT]</a>
</dt>
<dd><cite><a href="http://www.oasis-open.org/committees/relax-ng/compact-20021121.html">RELAX NG Compact Syntax</a></cite>, James Clark, Editor. OASIS Committee Specification, 21 November 2002. This document is http://www.oasis-open.org/committees/relax-ng/compact-20021121.html.</dd>
<dt>
<a id="ref-rdf-in-xhtml" name="ref-rdf-in-xhtml">[RDF-IN-XHTML]</a>
</dt>
<dd>
<cite><a href="http://infomesh.net/2002/rdfinhtml/">RDF in HTML: Approaches</a></cite>, Sean B. Palmer, 2002
</dd>
<dt>
<a id="ref-rfc2731" name="ref-rfc2731">[RFC-2731]</a>
</dt>
<dd>
<cite><a href="http://www.ietf.org/rfc/rfc2731.txt">RFC 2731 - Encoding Dublin Core Metadata in HTML</a></cite>, John Kunze, DCMI, December 1999.
</dd>
</dl>
<hr />
<h2>
<a id="section-Schemas" name="section-Schemas"></a>A Syntax Schemas (Informative)
</h2>
<p>This appendix contains XML schemas for validating RDF/XML forms.
These are example schemas for information only and are not part of
this specification.</p>
<h3>
<a id="section-RELAXNG-Schema" name="section-RELAXNG-Schema"></a>A.1
RELAX&#160;NG Compact Schema (Informative)
</h3>
<p>This is an example schema in RELAX&#160;NG Compact (for ease of reading)
for RDF/XML. Applications can also use the
<a href="rdfxml.xml">RELAX&#160;NG XML version</a>.
These formats are described in
<a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">RELAX&#160;NG</a> (<a href="#ref-relaxng">[RELAXNG]</a>)
and <a href="http://www.thaiopensource.com/relaxng/compact/">RELAX&#160;NG
Compact</a> (<a href="#ref-relaxng-nx">[RELAXNG-COMPACT]</a>).</p>
<div class="note"><p><strong>Note:</strong>
The RNGC schema has been updated to attempt to match the grammar but
this has not been checked or used to validate RDF/XML.
</p></div>
<div class="exampleOuter">
<div style="align:center"><a href="rdfxml.rng">RELAX NG Compact Schema for RDF/XML</a></div>
<div class="exampleInner">
<pre>
#
# RELAX NG Compact Schema for RDF/XML Syntax
#
# This schema is for information only and NON-NORMATIVE
#
# It is based on one originally written by James Clark in
# http://lists.w3.org/Archives/Public/www-rdf-comments/2001JulSep/0248.html
# and updated with later changes.
#
namespace local = ""
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
start = doc
# I cannot seem to do this in RNGC so they are expanded in-line
# coreSyntaxTerms = rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType | rdf:resource | rdf:nodeID | rdf:datatype
# syntaxTerms = coreSyntaxTerms | rdf:Description | rdf:li
# oldTerms = rdf:aboutEach | rdf:aboutEachPrefix
# nodeElementURIs = * - ( coreSyntaxTerms | rdf:li | oldTerms )
# propertyElementURIs = * - ( coreSyntaxTerms | rdf:Description | oldTerms )
# propertyAttributeURIs = * - ( coreSyntaxTerms | rdf:Description | rdf:li | oldTerms )
# Also needed to allow rdf:li on all property element productions
# since we can't capture the rdf:li rewriting to rdf_&lt;n&gt; in relaxng
# Need to add these explicitly
xmllang = attribute xml:lang { text }
xmlbase = attribute xml:base { text }
# and to forbid every other xml:* attribute, element
doc =
RDF
RDF =
element rdf:RDF {
xmllang?, xmlbase?, nodeElementList
}
nodeElementList =
nodeElement*
# Should be something like:
# ws* , ( nodeElement , ws* )*
# but RELAXNG does this by default, ignoring whitespace separating tags.
nodeElement =
element * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype | rdf:li |
rdf:aboutEach | rdf:aboutEachPrefix | xml:* ) {
(idAttr | nodeIdAttr | aboutAttr )?, bagIdAttr?, xmllang?, xmlbase?, propertyAttr*, propertyEltList
}
# It is not possible to say "and not things
# beginning with _ in the rdf: namespace" in RELAX NG.
ws =
" "
# Not used in this RELAX NG schema; but should be any legal XML
# whitespace defined by http://www.w3.org/TR/2000/REC-xml-20001006#NT-S
propertyEltList =
propertyElt*
# Should be something like:
# ws* , ( propertyElt , ws* )*
# but RELAXNG does this by default, ignoring whitespace separating tags.
propertyElt =
resourcePropertyElt |
literalPropertyElt |
parseTypeLiteralPropertyElt |
parseTypeResourcePropertyElt |
parseTypeCollectionPropertyElt |
parseTypeOtherPropertyElt |
emptyPropertyElt
resourcePropertyElt =
element * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype |
rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix |
xml:* ) {
idAttr?, xmllang?, xmlbase?, nodeElement
}
literalPropertyElt =
element * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype |
rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix |
xml:* ) {
(idAttr | datatypeAttr )?, xmllang?, xmlbase?, text
}
parseTypeLiteralPropertyElt =
element * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype |
rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix |
xml:* ) {
idAttr?, parseLiteral, xmllang?, xmlbase?, literal
}
parseTypeResourcePropertyElt =
element * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype |
rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix |
xml:* ) {
idAttr?, parseResource, xmllang?, xmlbase?, propertyEltList
}
parseTypeCollectionPropertyElt =
element * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype |
rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix ) {
idAttr?, xmllang?, xmlbase?, parseCollection, nodeElementList
}
parseTypeOtherPropertyElt =
element * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype |
rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix |
xml:* ) {
idAttr?, xmllang?, xmlbase?, parseOther, any
}
emptyPropertyElt =
element * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype |
rdf:Description | rdf:aboutEach | rdf:aboutEachPrefix |
xml:* ) {
idAttr?, (resourceAttr | nodeIdAttr)?, bagIdAttr?, xmllang?, xmlbase?, propertyAttr*
}
idAttr =
attribute rdf:ID {
IDsymbol
}
nodeIdAttr =
attribute rdf:nodeID {
IDsymbol
}
aboutAttr =
attribute rdf:about {
URI-reference
}
bagIdAttr =
attribute rdf:bagID {
IDsymbol
}
propertyAttr =
attribute * - ( rdf:RDF | rdf:ID | rdf:about | rdf:bagID | rdf:parseType |
rdf:resource | rdf:nodeID | rdf:datatype | rdf:li |
rdf:Description | rdf:aboutEach |
rdf:aboutEachPrefix | xml:* ) {
string
}
resourceAttr =
attribute rdf:resource {
URI-reference
}
datatypeAttr =
attribute rdf:datatype {
URI-reference
}
parseLiteral =
attribute rdf:parseType {
"Literal"
}
parseResource =
attribute rdf:parseType {
"Resource"
}
parseCollection =
attribute rdf:parseType {
"Collection"
}
parseOther =
attribute rdf:parseType {
text
}
URI-reference =
string
literal =
any
IDsymbol =
xsd:NMTOKEN
any =
mixed { element * { attribute * { text }*, any }* }
</pre>
</div>
</div>
<h2>
<a id="section-Changes" name="section-Changes">B Changes (Informative)</a>
</h2>
<p>Changes since the <a href="http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/">8 November 2002</a> working draft</p>
<p>(Newest at top)</p>
<ul>
<li><a href="#rdf-ns-uri">5.1 RDF Namespace</a> Correct the
rdf:_<em>n</em> phrasing to forbid rdf:_0 and anything with leading zeros.</li>
<li><a href="#rdf-ns-uri">5.1 RDF Namespace</a> Forbid XML namespaces
with a namespace URI that is a prefix of the RDF or XML namespace URI references.</li>
<li><a href="#section-Identifiers">5.2 Identifiers</a>
Blank nodeIDs in RDF/XML are scoped to the infoset document infoitem.</li>
<li><a href="#section-Syntax">Section 2</a> Added links to the N-Triples answers for all the complex examples</li>
<li>Updated <a href="#section-References">References</a></li>
<li><a href="#parseTypeLiteralPropertyElt">7.2.1 parseTypeLiteralPropertyElt</a>
Removed reference to RDF Concepts canonicalization and added new
paragraph describing the freedom on the lexical forms of XML Literal.<br />
Added
<a href="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/">Exclusive XML Canonicalization</a> [<a href="#ref-xml-xc14n">XML-XC14N</a>]
to normative references.</li>
<li>Updated links to match RDF Concepts new definitions</li>
<li>Status, abstract, notes: Updated</li>
<li>Appendix C (now Appendix B). Removed older changes to leave
only those since the last working draft.
(<a href="http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#section-Changes">Appendix C in 8 November 2002 draft</a>)
</li>
<li>Appendix B <em>Other Syntax Schemas (Informative)</em>. Deleted.
(<a href="http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#section-Other-Schemas">Appendix B in 8 November 2002 draft</a>)
</li>
<li>Appendix A <em>Issues</em>. Deleted.
(<a href="http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#section-Updated-Grammar-changes">Appendix A in 8 November 2002 draft</a>)
</li>
<li>6.1.6 Identifier Event. Split this into
<a href="#section-identifier-node">URI Reference Event (6.1.6)</a>
and
<a href="#section-blank-nodeid-event">Blank Node Identifier event (6.1.7)</a>.<br />
<a href="#section-Infoset-Grammar-Notation">6.3 Grammar Notation</a>
split notation identifier() with uri() and bnodeid().
Updated the grammar to use these.</li>
<li>
Added generated-blank-node-id() grammar notation to explictly
show when such things are generated</li>
<li><a href="#section-Identifiers">5.2 Identifiers</a> expanded
Blank Node Identifiers description
including <code>rdf:nodeID</code> values and generated ones</li>
<li><a href="#section-baseURIs">5.3 Base URIs</a> retitled
<em>Resolving URIs</em></li>
<li><a href="#section-Infoset-Grammar-Notation">6.3 Grammar Notation</a>
Added resolve() grammar action notation to explicitly note
when URI resolving is done as RDF URI References are built from string
content and in-scope base URIs.</li>
<li>6.1.8 XML Literal Event. Replaced with
<a href="#section-typed-literal-node">Typed Literal Event</a>.<br />
<a href="#section-Infoset-Grammar-Notation">6.3 Grammar Notation</a>.
Replaced grammar action notation xml() with typed-literal()<br />
This matches the terms in RDF Concepts.</li>
<li>Replaced <code>rdfs:XMLLiteral</code> with <code>rdf:XMLLiteral</code> in
<a href="#rdf-ns-uri">5.1 RDF Namespace</a>,
<a href="#parseTypeLiteralPropertyElt">7.2.1 parseTypeLiteralPropertyElt</a>.
</li>
</ul>
<p>Previous changes are listed in the
<a href="http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#section-Changes">changes section</a>
of the previous
<a href="http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/">8 November 2002</a> working draft.</p>
<hr />
<div class="metadata">
<p><a href="metadata.rdf"><img src="http://www.w3.org/RDF/icons/rdf_metadata_button.40" alt="RDF/XML Metadata" /></a></p>
</div>
</body>
</html>