W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > May 2008

Re: Preservation of namespaces in XML Literals (was Re: RDFa Test Harness)

From: Ivan Herman <ivan@w3.org>
Date: Mon, 12 May 2008 19:37:55 +0200
Message-ID: <48288073.1040908@w3.org>
To: Manu Sporny <msporny@digitalbazaar.com>
Cc: RDFa <public-rdf-in-xhtml-tf@w3.org>, Toby A Inkster <mail@tobyinkster.co.uk>
Many, Toby,

one remark to the comments/questions below, although it is a side issue. 
Crazy ivan is based on issuing ASK queries to SPARQL engines, but those 
engines may (and, in some cases, do) get to erroneous conclusions with 
XML Literals. The trivial example I ran into with SPARQler was whether I 
  use the character " or the character ' for an attribute. The two 
should be considered to be identical, but they are not by the SPARQL 
engine. Ie, all those cases the automatism of crazy ivan would fail and, 
I am afraid, we will have to manually adjust the test results:-(

Manu Sporny wrote:
>>> The proper output for that particular statement should be (in N3):
>>> <http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0092.xhtml>
>>>    dc:title
>>>       "E = mc<sup xmlns=\"http://www.w3.org/1999/xhtml\">2</sup>: The
>>> Most Urgent Problem of Our Time"^^rdf:XMLLiteral.
>> Would not the following be equally acceptable? And if not, why not?
>> <http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0092.xhtml>
>>   dc:title
>>     "E = mc<x:sup xmlns:x=\"http://www.w3.org/1999/xhtml\"
>>      >2</x:sup>: The Most Urgent Problem of Our Time"^^rdf:XMLLiteral .
>> The syntax document certainly doesn't seem to forbid it.
>> See Gell-Mann's Totalitarian Principle.
> The above would be acceptable as far as I understand the discussion thus
> far. Both statements are functionally equivalent. Perhaps others have a
> different point of view...

Hm. this is a murky issue. Toby is absolutely right that the two XML 
fragments are identical in the sense of the XML Infoset they represent 
in this particular syntactical form.

However... The RDF Syntax document defines the internal representation 
of an XML Literal in the abstract triple store as the canonical XML 
representation of the XML Literal. The canonical XML specification[1] 
does not equate two canonicalized XML fragment if the only difference 
between the two is namespace rewriting (see [2]). The way I understand 
this is that the fact that one fragment uses a default namespace whereas 
the other uses the 'x' namespace suffix means that the two XML Literals 
are different according to the RDF Concepts[3]. Ie, even a prefect 
SPARQL implementation would not equate the two for these reasons...

The issue (that may have to be revisited at some point) is in RDF; RDFa 
just inherits the murkiness...

I may have gone wrong somewhere, though. This issue continuously twists 
my mind, I must admit...


[1] http://www.w3.org/TR/2001/REC-xml-c14n-20010315
[2] http://www.w3.org/TR/2001/REC-xml-c14n-20010315#NoNSPrefixRewriting
[3] http://www.w3.org/TR/rdf-concepts/#section-XMLLiteral


Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Monday, 12 May 2008 17:38:10 UTC

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