Implement ISSUE-71 resolution
authorRichard Cyganiak <richard@cyganiak.de>
Wed, 09 Nov 2011 19:59:47 +0000
changeset 162 38eb943b676c
parent 161 6e987bbde3fc
child 163 77a867527ddb
Implement ISSUE-71 resolution
rdf-concepts/index.html
--- a/rdf-concepts/index.html	Wed Nov 02 11:11:13 2011 -0700
+++ b/rdf-concepts/index.html	Wed Nov 09 19:59:47 2011 +0000
@@ -306,9 +306,12 @@
       </tr>
     </table>
 
-    <p>RDF predefines just one datatype <code><a>rdf:XMLLiteral</a></code>, used for
-    embedding XML in RDF (see <a href="#section-XMLLiteral">section
-    5.1</a>).</p>
+    <p>RDF predefines just one datatype <code><a>rdf:XMLLiteral</a></code>,
+    used for embedding XML in RDF (see <a href="#section-XMLLiteral">section
+    5.1</a>). RDF also defines
+    <code><a title="language-tagged string">rdf:langString</a></code>, used
+    for plain text in a natural language, but this is not formally considered
+    a datatype.</p>
 
     <p>There is no built-in concept of numbers or dates or other common
     values. Rather, RDF defers to datatypes that are defined
@@ -331,33 +334,22 @@
     <p><a title="literal">Literals</a> are used to identify values such as numbers and dates
     by means of a lexical representation. Anything represented by a
     literal could also be represented by an <a>IRI</a>, but it is often more
-    convenient or intuitive to use literals.</p>
+    convenient or intuitive to use literals. All literals have a
+    <a>datatype IRI</a>. A literal denotes a member of the
+    datatype's <a>value space</a>, as indicated by its
+    <a>lexical-to-value mapping</a>.</li>
 
     <p>A literal may be the object of an RDF statement, but not the
     subject or the predicate.</p>
 
-    <p>Literals may be <cite>typed</cite> or <cite>language-tagged</cite>:</p>
-
-    <ul>
-      <li>A <a>typed literal</a> is a string combined with a
-      <a>datatype IRI</a>. It denotes the
-      member of the identified datatype's value space obtained by
-      applying the lexical-to-value mapping to the literal string.</li>
-
-      <li>A <a>language-tagged literal</a> is a string combined
-      with a language tag. This may be used for
-      plain text in a natural language. Language-tagged literals
-      are self-denoting.</li>
-    </ul>
-
     <p>Continuing the example from <a href="#section-Datatypes-intro">section
-    3.3</a>, the typed literals that can be defined using the XML
+    3.3</a>, the literals that can be defined using the XML
     Schema datatype <var>xsd:boolean</var> are:</p>
 
     <table border="1" cellpadding="5" summary=
     "This table lists the literals of type xsd:boolean.">
       <tr>
-        <th>Typed Literal</th>
+        <th>Literal</th>
 
         <th>Lexical-to-Value Mapping</th>
 
@@ -398,7 +390,7 @@
     </table>
 
     <p>For text that may contain 
-    markup, use typed literals
+    markup, use literals
 with type <a href="#section-XMLLiteral">rdf:XMLLiteral</a>.
 If language annotation is required, 
 it    must be explicitly included as markup, usually by means of an 
@@ -412,14 +404,6 @@
 
 <p class="issue">Update the XHTML 1.0 reference to something more recent?</p>
 
-<p>
-The string in both plain and typed literals is recommended to
-be in Unicode Normal Form C [[!NFC]]. This is motivated
-by [[CHARMOD]] particularly 
-<a href="http://www.w3.org/TR/2003/WD-charmod-20030822/#sec-Normalization">section 4 
-Early Uniform Normalization</a>.
-</p>
-
 </section>
 
 
@@ -483,10 +467,10 @@
 the abstraction used in
 XML Schema Part 2:
     Datatypes [[!XMLSCHEMA-2]].</p>
-<p>
-A datatype consists of a lexical space, a value space and a lexical-to-value 
-mapping.
-</p>
+
+    <p>A <dfn>datatype</dfn> consists of a lexical space, a value space
+    and a lexical-to-value mapping.</p>
+
 <p>The <dfn>lexical space</dfn> of a datatype is a set of Unicode [[!UNICODE]] strings.</p>
 <p>
 The <dfn>lexical-to-value mapping</dfn> of a datatype is a set of pairs whose 
@@ -552,6 +536,14 @@
 
 </div>
 
+    <p class="note"><a title="language-tagged string">Language-tagged
+    strings</a> have the <a>datatype IRI</a>
+    <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</code>.
+    No datatype is formally defined for this IRI because the definition
+    of datatypes does not accommodate <a title="language tag">language tags</a>.
+    The <a>value space</a> associated with the datatype IRI is the set
+    of all pairs of strings and language tags.</p>
+
 
 <section id="section-XMLLiteral">
     <h3>XML Content within an RDF Graph</h3>
@@ -564,8 +556,8 @@
     This is <a href="http://www.w3.org/2011/rdf-wg/track/issues/13">ISSUE-13</a>.</p>
 
     <p>RDF provides for XML content as a possible literal value.
-    Such content is indicated in an RDF graph using a typed literal
-    whose datatype is a special built-in datatype
+    Such content is indicated in an RDF graph using a literal
+    whose datatype is the built-in datatype
     <dfn>rdf:XMLLiteral</dfn>,
     defined as follows.</p>
 
@@ -817,44 +809,40 @@
 <section id="section-Graph-Literal">
     <h3>RDF Literals</h3>
 
-    <p class="issue">This section is a major departure from RDF 2004
-    as <a title="simple literal">simple literals</a> are now treated
-    as syntactic sugar for <code>xsd:string</code>
-    <a title="typed literal">typed literals</a>. Further changes
-    to RDF's literal design are under consideration:
-    <a title="language-tagged literal">Language-tagged literals</a>
-    may receive a datatype, and
-    <a href="http://www.w3.org/TR/rdf-plain-literal/"><code>rdf:PlainLiteral</code>s</a> [[RDF-PLAINLITERAL]]
-    may be folded into the design somehow. This is
-    <a href="http://www.w3.org/2011/rdf-wg/track/issues/71">ISSUE-71</a>.</p>
+    <p>A <dfn>literal</dfn> in an <a>RDF graph</a> consists of:</p>
 
-    <p>A <dfn>literal</dfn> in an <a>RDF graph</a> is either a
-    <a>typed literal</a> or a <a>language-tagged literal</a>.</p>
-
-    <p>All literals have a <dfn>lexical form</dfn> being a Unicode
-    [[!UNICODE]] string, which SHOULD be in Normal Form C [[!NFC]].</p>
+    <ul>
+    <li>a <dfn>lexical form</dfn> being a Unicode [[!UNICODE]] string,
+    which should be in Normal Form C [[!NFC]],</li>
+    <li>a <dfn>datatype IRI</dfn> being an <a>IRI</a>.</li>
+    </ul>
 
-    <p><dfn title="language-tagged literal">Language-tagged literals</dfn> have
-    a <a>lexical form</a> and a non-empty <dfn>language tag</dfn> as
-    defined by [[!BCP47]]. The language tag MUST be well-formed according to
+    <p>A <dfn>language-tagged string</dfn> is any <a>literal</a>
+    whose <a>datatype IRI</a> is equal to
+    <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</code>.
+    In addition to <a>lexical form</a> and datatype IRI,
+    a language-tagged string also has:</p>
+
+    <ul>
+    <li>a non-empty <dfn>language tag</dfn> as defined by [[!BCP47]].
+    The language tag MUST be well-formed according to
     <a href="http://tools.ietf.org/html/bcp47#section-2.2.9">section 2.2.9</a>
-    of [[!BCP47]], and MUST be normalized to lowercase.</p>
+    of [[!BCP47]], and MUST be normalized to lowercase.</li>
+    </ul>
 
-    <p><dfn title="typed literal">Typed literals</dfn> have a <a>lexical form</a>
-    and a <dfn>datatype IRI</dfn> being an <a>IRI</a>.</p>
- 
     <p>Concrete syntaxes MAY support <dfn title="simple literal">simple
     literals</dfn>, consisting of only a <a>lexical form</a>
-    without any language tag or datatype IRI. Simple literals only
+    without any datatype IRI or language tag. Simple literals only
     exist in concrete syntaxes, and are treated as
     syntactic sugar for abstract syntax
-    <a title="plain literal">typed literals</a> with the datatype IRI
-    <code>http://www.w3.org/2001/XMLSchema#string</code>.
-    Simple literals and <a>language-tagged literals</a> are
-    collectively known as <dfn title="plain literal">plain literals</dfn>.</p>
+    <a title="literal">literals</a> with the <a>datatype IRI</a>
+    <code>http://www.w3.org/2001/XMLSchema#string</code>.</p>
 
-    <p class="note">Earlier versions of RDF allowed
-    <a title="simple literal">simple literals</a> in the abstract syntax.</p>
+    <p class="note">In earlier versions of RDF, literals with a
+    <a>language tag</a> did not have a <a>datatype IRI</a>, and
+    <a title="simple literal">simple literals</a> could appear
+    directly in the abstract syntax. Simple literals and literals with a
+    language tag were collectively known as <dfn>plain literals</dfn>.</p>
 
       <p class="note">Literals in which the lexical form begins with a
       composing character (as defined by [[CHARMOD]]) are allowed however they may cause
@@ -901,43 +889,44 @@
       character.</li>
     </ul>
 
-      <p class="note">RDF Literals are distinct and distinguishable
-      from <a title="IRI">IRIs</a>; e.g. <code>http://example.org/</code> as an RDF
-      Literal (untyped, without a language tag) is not equal to
-      <code>http://example.org/</code> as an IRI.</p>
+    <p class="note">RDF Literals are distinct and distinguishable
+    from <a title="IRI">IRIs</a>; e.g. <code>http://example.org/</code>
+    as a string <a>literal</a> is not equal to <code>http://example.org/</code>
+    as an IRI.</p>
 </section>
 
 
 <section id="section-Literal-Value">
-    <h4>The Value Corresponding to a Typed Literal</h4>
+    <h4>The Value Corresponding to a Literal</h4>
 
-    <p>The datatype IRI refers to a <a href=
-    "#section-Datatypes">datatype</a>. For XML Schema <a href=
-    "http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#built-in-datatypes">
-    built-in</a> datatypes, IRIs such as
+    <p>The <a>datatype IRI</a> refers to a <a>datatype</a>. For XML Schema
+    <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#built-in-datatypes">built-in</a>
+    datatypes, IRIs such as
     <code>http://www.w3.org/2001/XMLSchema#int</code> are used. The IRI
     of the datatype <a href="#section-XMLLiteral"><tt>rdf:XMLLiteral</tt></a> may be used.
     There may be other, implementation dependent, mechanisms by which
     IRIs refer to datatypes.</p>
 
-    <p>The <em>value</em> associated with a typed literal is found by
-    applying the lexical-to-value mapping associated with the datatype IRI to
-    the lexical form.
-    </p>
+    <p>The <dfn>literal value</dfn> associated with a <a>literal</a> is:</p>
+
+    <ul>
+    <li><strong>If the literal is a <a>language-tagged string</a>:</strong>
+    a pair consisting of its <a>lexical form</a> and its <a>language tag</a>,
+    in that order.</li>
+    <li><strong>Otherwise:</strong> the result of applying the
+    <a>lexical-to-value mapping</a> associated with the <a>datatype IRI</a>
+    to the <a>lexical form</a>.</li>
+    </ul>
 
     <p>
  If the lexical form is not in
     the lexical space of the datatype associated with the datatype IRI,
-then no literal value can be associated with the typed literal.
+then no literal value can be associated with the literal.
 Such a case, while in error, is not  <em>syntactically</em> ill-formed.</p>
-<!--
-    <p>A typed literal for which the datatype does not map the lexical
-    form to a value is not syntactically ill-formed.</p>
--->
     
 
       <p class="note">
-In application contexts, comparing the values of typed literals (see 
+In application contexts, comparing the values of literals (see 
 <a href="#section-Literal-Value">
 section
 6.5.2</a>)
@@ -1176,9 +1165,10 @@
   <h2>Changes from RDF 2004</h2>
 
   <ul>
+    <li>2011-11-09: Updated the two sections on literals to reflect the <a href="http://www.w3.org/2011/rdf-wg/track/issues/71">ISSUE-71</a> resolution that literals with language tag now have the datatype IRI <code>rdf:langString</code>. Formally introduced the term “language-tagged string”.</li>
     <li>2011-08-13: Updated Turtle reference to Turtle FPWD</li>
     <li>2011-07-21: Condensed the 2004 acknowledgements</li>
-    <li>2011-07-21: Updated the two sections on literals to reflect the <a href="">ISSUE-12 resolution</a> that simple literals are no longer part of the abstract syntax. Formally introduced the terms “language-tagged literal”, “simple literal”.</li>
+    <li>2011-07-21: Updated the two sections on literals to reflect the <a href="http://www.w3.org/2011/rdf-wg/track/issues/12">ISSUE-12</a> resolution that simple literals are no longer part of the abstract syntax. Formally introduced the terms “language-tagged literal”, “simple literal”.</li>
     <li>2011-07-21: Updated the introduction, and removed many mentions of RDF/XML. Changed the normative reference for the terms in the RDF namespace from the RDF/XML spec to the RDF Schema spec. Removed any mention of the 1999 version of RDF.</li>
     <li>2011-07-21: Replaced RFC 2279 reference (UTF-8) with RFC 3629</li>
     <li>2011-07-20: Removed informative sections “Motivations and Goals” (see <a href="http://www.w3.org/TR/rdf-concepts/#section-Overview">RDF 2004 version</a>) and “RDF Expression of Simple Facts” (see <a href="http://www.w3.org/TR/rdf-concepts/#section-SimpleFacts">RDF 2004 version</a>)</li>