implement ISSUE-13 resolution (modified rdf:XMLLiteral)
authorRichard Cyganiak <>
Wed, 09 May 2012 19:02:43 +0100
changeset 324 2487359dafb5
parent 323 42a1a17c582e
child 325 c7f66fe9a374
implement ISSUE-13 resolution (modified rdf:XMLLiteral)
--- a/rdf-concepts/index.html	Wed May 09 17:52:43 2012 +0100
+++ b/rdf-concepts/index.html	Wed May 09 19:02:43 2012 +0100
@@ -617,6 +617,10 @@
     and provides one additional built-in datatype,
+    <p class="issue">The Working Group is planning to add an HTML datatype
+    to better address the use case of including text with markup. This is
+    <a href="">ISSUE-63</a>.</p>
     <p>A <dfn>datatype</dfn> consists of a <a>lexical space</a>,
     a <a>value space</a> and a <a>lexical-to-value mapping</a>, and
     is denoted by one or more <a title="IRI">IRIs</a>.</p>
@@ -830,23 +834,10 @@
 <section id="section-XMLLiteral">
     <h3>The <code>rdf:XMLLiteral</code> Datatype</h3>
-    <p class="issue">The canonicalization rules required for XML literals
-    are quite complicated. Increasingly, RDF is produced and consumed in
-    environments where no XML parser and canonicalization engine is
-    available. A possible change to relax the requirements for the
-    lexical space, while retaining the value space, is under discussion.
-    This is <a href="">ISSUE-13</a>.</p>
     <p>RDF provides for XML content as a possible <a>literal value</a>.
     Such content is indicated in an <a>RDF graph</a> using a <a>literal</a>
     whose <a>datatype</a> is a special built-in datatype
-    <code>rdf:XMLLiteral</code>.
-    This allows the inclusion of text that contains markup, such as
-    XHTML [[XHTML11]].</p>
-    <p class="issue">The Working Group is planning to add an HTML datatype
-    to better address the use case of including text with markup. This is
-    <a href="">ISSUE-63</a>.</p>
+    <code>rdf:XMLLiteral</code>.</p>
     <p><code><dfn>rdf:XMLLiteral</dfn></code> is defined as follows.</p>
@@ -859,73 +850,71 @@
       <dt><a name="XMLLiteral-lexical-space" id="XMLLiteral-lexical-space">The lexical space</a></dt>
-<dd>is the set of all
-<li>which are well-balanced, self-contained 
-<a href="">
-XML content</a> 
-<li>for which encoding as UTF-8 
-[[!UTF-8]] yields 
-<a href="">
-Canonical XML </a> (with comments, with empty  
-<a href="">
-InclusiveNamespaces PrefixList
-</a>) [[!XML-EXC-C14N]];
-<li>for which embedding between an arbitrary XML start tag and an end tag
-yields a document conforming to <a href=
-      "">XML
-      Namespaces</a> [[!XML-NAMES]]</li>
+      <dd>is the set of all strings which are well-balanced, self-contained 
+      <a href="">XML content</a> 
+      [[!XML10]]; and for which embedding between an arbitrary
+      XML start tag and an end tag yields a document conforming to
+      <a href="">XML Namespaces</a>
+      [[!XML-NAMES]].</dd>
-   <dt><a name="XMLLiteral-value-space" id="XMLLiteral-value-space">The value space</a></dt>
+      <dt><a name="XMLLiteral-value-space" id="XMLLiteral-value-space">The value space</a></dt>
-      <dd>is a set of entities, called XML values, which is:
-<li>disjoint from the lexical space;</li>
-<li>disjoint from the value space of any other datatype that is not explicitly defined as a sub- or supertype of this datatype;</li>
-<li>disjoint from the set of Unicode character strings [[!UNICODE]];</li>
-<li>and in 1:1 correspondence with the lexical space.</li>
+      <dd>is a set of DOM
+      <a href=""><code>DocumentFragments</code></a>
+      [[!DOM-LEVEL-3-CORE]]. Two
+      <a href=""><code>DocumentFragments</code></a>
+      <em>A</em> and <em>B</em> are considered equal
+      if and only if the DOM method
+      <code><em>A</em>.<a href="">isEqualNode</a>(<em>B</em>)</code>
+      returns <code>true</code>.</dd>
       <dt><a name="XMLLiteral-mapping" id="XMLLiteral-mapping">The lexical-to-value mapping</a></dt>
-      <dd>
-is a one-one mapping from the lexical space onto the value space,
-    i.e. it is both injective and surjective.
+      <dd>is defined as follows:
+      <ul>
+      <li>Let <code>xmldoc</code> be the literal's lexical form,
+      wrapped between an arbitrary XML start-tag and matching end-tag</li>
+      <li>Let <code>domdoc</code> be a DOM
+      <a href=""><code>Document</code></a>
+      object [[!DOM-LEVEL-3-CORE]] corresponding to <code>xmldoc</code></li>
+      <li>Let <code>domfrag</code> be a DOM
+      <a href=""><code>DocumentFragment</code></a>
+      whose
+      <a href=""><code>childNodes</code></a>
+      attribute is equal to the
+      <a href=""><code>childNodes</code></a>
+      attribute of <code>domdoc</code>'s
+      <a href=""><code>documentElement</code></a>
+      attribute</li>
+      <li>Return <code>domfrag.<a href="">normalize</a>()</code></li>
+      </ul></dd>
+      <dt><a name="XMLLiteral-canonical" id="XMLLiteral-canonical">The canonical mapping</a></dt>
+      <dd>defines a
+      <a href="">canonical lexical form</a>
+      [[!XMLSCHEMA11-2]] for each member of the value space.
+      The <code>rdf:XMLLiteral</code> canonical mapping is the
+      <a href="">exclusive
+      XML canonicalization method</a> (<em>with comments, with empty  
+      <a href="">
+      InclusiveNamespaces PrefixList</a></em>) [[!XML-EXC-C14N]].
+      </dl>
-    </dl>
+      <p class="note">Any XML namespace declarations (<code>xmlns</code>)
+      and language annotation (<code>xml:lang</code>) desired in the
+      XML content must be included explicitly in the XML literal.
+      Note that some concrete RDF syntaxes may define mechanisms
+      for inheriting them from the context
+      (e.g., <a href=""><code>@parseType="literal"</code></a>
+      in RDF/XML [[RDF-SYNTAX-GRAMMAR]]).</p>
       <p class="note">Not all values of this datatype are compliant
       with XML 1.1 [[XML11]]. If compliance
       with XML 1.1 is desired, then only those values that are
-<a href="">fully
+<a href="">fully
       normalized</a> according to XML 1.1 should be used.</p>
-      <p class="note">XML values can be thought of as the 
-[[XML-INFOSET]] or the [[XPATH]]
-nodeset corresponding to the lexical form, with an appropriate equality
-    <p class="note">RDF applications may use additional equivalence relations,
-    such as that which relates an 
-    <a href=""><code>xsd:string</code></a>
-    with an <code>rdf:XMLLiteral</code> corresponding to a single text node
-    of the same string.</p>
-    <p class="note">If language annotation of XML literals is required, 
-    it must be explicitly included as markup, usually by means of an 
-    <code>xml:lang</code> attribute.</p>
 <section id="datatype-maps">
@@ -935,16 +924,18 @@
     &lt;<a>IRI</a>, <a>datatype</a>&gt; pairs such that no
     IRI appears twice in the set and the IRI denotes the datatype.
     It can be seen as a function from IRIs
-    to datatypes. Every datatype map contains the pair
-    &lt;<code></code>,
-    <code><a>rdf:XMLLiteral</a></code>&gt;.</p>
+    to datatypes.</p>
-    <p>The <dfn>XSD datatype map</dfn> is the <a>datatype map</a>
-    which also contains the set of all pairs of the form
-    &lt;<code><em>xxx</em></code>,
-    <code>xsd:<em>xxx</em></code>&gt;, where <code>xsd:<em>xxx</em></code>
-    is the name of an
-    <a title="RDF-compatible XSD types">RDF-compatible XSD type</a>.</p>
+    <p>If a <a>datatype map</a> contains the IRI
+    <code></code>,
+    then it MUST be paired with the datatype
+    <code><a>rdf:XMLLiteral</a></code>.</p>
+    <p>If a <a>datatype map</a> contains an IRI of the form
+    <code><em>xxx</em></code>,
+    then it MUST be paired with the
+    <a title="RDF-compatible XSD types">RDF-compatible XSD type</a>
+    named <code>xsd:<em>xxx</em></code>.<p>
@@ -1123,6 +1114,7 @@
   <h2>Changes from RDF 2004</h2>
+    <li>2012-05-09: <code><a>rdf:XMLLiteral</a></code> no longer requires lexical forms to be canonicalized, and the value space is now defined in terms of [[DOM-LEVEL-3-CORE]] (<a href="">ISSUE-13</a>)</li>
     <li>2012-05-09: Removed Section 3 <em>RDF Vocabulary IRI and Namespace</em>; its contents will be folded into the RDF Schema document</li>
     <li>2012-05-02: Renamed “graph equivalence” to “<a>graph isomorphism</a>” (<a href="">ISSUE-86</a>)</li>
     <li>2012-05-02: Updated [[XMLSCHEMA11-1]] and [[XMLSCHEMA11-2]] references to the new REC versions</li>