W3C home > Mailing lists > Public > www-rdf-comments@w3.org > July to September 2003

Re: support XML Literals in RDF

From: Peter F. Patel-Schneider <pfps@research.bell-labs.com>
Date: Thu, 07 Aug 2003 11:28:37 -0400 (EDT)
Message-Id: <20030807.112837.128874877.pfps@research.bell-labs.com>
To: dave.beckett@bristol.ac.uk
Cc: www-rdf-comments@w3.org, duerst@w3.org

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Subject: Re: support XML Literals in RDF
Date: Thu, 7 Aug 2003 12:59:40 +0100

> On Thu, 07 Aug 2003 07:35:08 -0400 (EDT)
> "Peter F. Patel-Schneider" <pfps@research.bell-labs.com> wrote:
> > From: Dave Beckett <dave.beckett@bristol.ac.uk>
> > Subject: Re: support XML Literals in RDF (was Re: Test cases: XML Literal value space and exclusive canonicalization)
> > Date: Thu, 7 Aug 2003 12:22:00 +0100
> > 
> > > On Thu, 07 Aug 2003 07:02:52 -0400
> > > "Peter F. Patel-Schneider" <pfps@research.bell-labs.com> wrote:
> <snip/>
> > > Any RDF application that doesn't do (RDF, RDFS, any) entailment does not
> > > need this "considerable code".
> > 
> > This is needed for more than just entailment.  For example, as indicated
> > above, determining whether a^^rdf:XMLLiteral is indeed a valid XML Literal
> > requires considerable code.
> Which is as I said below, in the rdf/xml parsers and done for you.  The literals
> will be valid (exc-C14N checked).

Not even all XML Literals that result from RDF/XML parsing will be valid
(exc-C14N checked).  For example (modulo issues with using rdf: in places
where it really can't be used)

    <http://ex.a/a#a rdf:datatype="rdf:XMLLiteral"><b/></http://ex.a/a#a>

will result in the triple

_:a <http://ex.a/a#a> "<b/>"^^rdf:XMLLiteral .

which has an XML Literal in non-canonical form.

> > > > Also, any application that needs to determine the RDFS implications of 
> > > > an RDF graph needs at least an oracle to determine whether a sequence of 
> > > > octets is in the value space of rdf:XMLLiteral.
> > > 
> > > The RDF/XML rdf:parseType="Literal" exc-C14N  checks that for you, in
> > > the parsing.
> > 
> > Sure, but not all RDF graphs are the result of parsing RDF/XML documents.
> > Further, there is no indication in an RDF graph of whether the graph is the
> > result of parsing an RDF/XML document.   So, determining the RDFS
> > entailments of an RDF graph requires access to an oracle for canonical XML.
> So in this hypothetical situation where you want to use XML literals in
> the RDF graph but don't want to use XML tools, you don't want to
> do any checks when you make the triples?  Sorry, you will just have to
> use the exc-C14N, or not use the XML literals at all and make your own
> unchecked "XML" datatype, losing out on interop.

Right, so if anyone wants to write a tool that determines RDFS entailment
between RDF graphs, they will have to incorporate a tool for exclusive
canonical XML.

> Your oracle is an exc-C14N implementation which I've already mentioned
> is fairly widely available - we've had no problems finding them free and
> working. 

Is there an oracle for exclusive canonical XML?  I realize that there are
tools that will transform into exclusive canonical XML, but do they have a
simple oracle?  

> You will also have to NFC-check your plain literals as we
> discussed in the other thread.  Otherwise you've got garbage.

Garbage?  I disagree entirely.  What you have is XML or strings that may
not be in some canonical form.  This is not garbage.

> > > There are no octets in the graph.  The Unicode strings in the graph that
> > > make up the lexical forms of XML literals will be in exc-C14N form, if
> > > used via rdf:parseType="Ltieral" and require no XML code for your
> > > entailments.
> > 
> > Not according to the current editor's draft of RDF/XML Syntax Specification
> > (Revised) where the result of 7.2.17 is an octet sequence.  (Either that or
> > the initial string, which would mean that XML Literals are not normalized
> > at all during RDF/XML parsing.)
> I already said elsewhere I've drafted new words for that.
> > > If you had said datatype-entailment then that would be your oracle - an
> > > XSD implementation library for example.  Such a "considerable code"
> > > would likely have to include some XML support, since the X in XSD stands
> > > for XML.  There seem to be such libraries freely already available.
> > 
> > Why would an XSD library have XML canonicalization code in it?  Is there
> > any XSD datatype that needs this?  I can't see one.
> I said datatype-entailment and hence a pile of code for checking such
> XML functionality in the graph.  That means whatever XSD does.  I've not
> read the detail.  There is normalization involved somewhere, I recall.

Where?  I can't find any XSD datatype that needs XML canonicalization.

> Dave

Received on Thursday, 7 August 2003 11:28:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:15:21 UTC