W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > July 2003

Re: first pass parseType="Literal" text for primer

From: Graham Klyne <gk@ninebynine.org>
Date: Tue, 22 Jul 2003 14:44:02 +0100
Message-Id: <5.1.0.14.2.20030722144051.01e79230@127.0.0.1>
To: Brian McBride <bwm@hplb.hpl.hp.com>, rdf core <w3c-rdfcore-wg@w3.org>

Mostly, this seems OK.  I did not feel the final paragraph was fully 
motivated.  I would suggest emphasizing the point that treatment of plain 
literals and XML literals is different, which would give the reason for "or 
design the application to handle both plain literals and rdf:XMLLiteral's".

Hmmm... can't say I love the use of rdf:XMLLiteral here as a noun, but 
that's just a stylistic nit.

#g
--

At 18:21 21/07/03 +0100, Brian McBride wrote:

>4.5 parseType="Literal"
>
>The RDF/XML syntax is designed to make it easy for the values of
>properties to be fragments of XML.  Whilst this feature is may be used
>with arbritary fragments of XML, it was designed specifically to enable
>the values of properties to be rich text represented as XML markup.
>
>For example, A publisher might maintain RDF meta data that includes the
>titles of books and articles.  Whilst such titles are often just simple
>strings of characters, this is not always the case.  The titles of books
>on mathematics may contain mathematical formulae, that could be
>represented using MathML [@@REF].  Titles may include HTML markup.
>
>For example  [@@complete namespaces etc]:
>
>   <rdf:Description>
>     <dc:title rdf:parseType="Literal">  <!-- @@spelling? -->
>       <span xml:lang="en">
>         The <em>&lt;br /&gt;</em> Element Considered Harmful.
>       </span>
>     </dc:title>
>   </rdf:Description>
>
>describes a graph containing one triple:
>
>   _:a <dc:title> " \
>       <span xml:lang="en" xmlns:dc="@@"> \
>         The <em>&lt;br /&gt;</em> Element Considered Harmful. \
>       </span>"^^rdf:XMLLiteral .  # @@ needs checking
>
>The rdf:parseType="Literal" attribute in the RDF/XML indicates that all
>the XML within the <dc:title> element is an XML fragment that is the
>value of the dc:title property.
>
>The value of the property is a typed literal, whose datatype,
>rdf:XMLLiteral is defined by RDF, specifically to represent fragments of
>XML.  The XML fragment is canonicalized according to the XML Exclusive
>Canonicalization recommendation [@@ref].  This causes declarations of
>used namespaces to be added to the fragment, the escaping of reserved
>characters such as '<', '>' and '&', and possibly, the re-ordering of
>attributes.  Contextual attributes, such as xml:lang and xml:base are
>not inherited from the RDF/XML document, and, if required, must, as
>shown in the example, be explicitly specified in the XML fragment.
>
>This example illustrates that designers should take care when designing
>RDF data.  In cases where the value of a property may sometimes contain
>rich text and sometimes not, the designer should either use
>rdf:parseType="Literal" throughout, or design the application to handle
>both plain literals and rdf:XMLLiteral's.

-------------------
Graham Klyne
<GK@NineByNine.org>
PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E
Received on Tuesday, 22 July 2003 10:35:12 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:58:46 EDT