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

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

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Mon, 12 May 2008 12:17:30 -0400
Message-ID: <48286D9A.90404@digitalbazaar.com>
To: RDFa <public-rdf-in-xhtml-tf@w3.org>
CC: Toby A Inkster <mail@tobyinkster.co.uk>

Hey Toby - I'm forwarding this discussion on to the RDF-in-XHTML work
group as it's important feedback regarding the RDFa Syntax document.

TaskForcers, this discussion arose when Toby mentioned that Test Case
#92 was failing for an unknown reason:

> Toby Inkster wrote:
> Here's a comment on one specific test (test 92). Cognition's output
> includes:
>
>    <dc:title
> rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"
> rdf:parseType="Literal" xmlns="http://www.w3.org/1999/xhtml">E =
> mc<sup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2</sup>:
> The Most Urgent Problem of Our Time</dc:title>
>
> Which Crazy Ivan doesn't seem to like.
>
>> Manu Sporny wrote:
>> Nope, Cognition's output isn't valid.
>>
>> xmlns="http://www.w3.org/1999/xhtml" MUST exist on the <sup> element in
>> that particular test (Test Case #92).
> 
> Toby Inkster wrote:
> The latest public editors' draft of the syntax spec seems to disagree
> with you - see section 6.3.1.3.

I think section 6.3.1.3 of the latest public editor's draft[1] is wrong
and we need to fix it.

> I *do* preserve the namespace - but I put the @xmlns on the RDF
> predicate element (in this example <dc:title/>) rather than the
> top-level child elements. From my understanding of the RDF/XML and
> XMLNS specs, the two approaches are exactly equivalent, and the RDFa
> syntax document doesn't seem to require one method over another.

You are correct, as far as RDF/XML and the XMLNS specs are concerned,
the graphs generated are functionally equivalent for the purposes which
we are discussing. However, we're concerned with the use of those
triples outside of an RDF/XML context.

One of the reasons we pushed namespace preservation into the actual XML
Literal itself was because you don't know what an application is going
to do with that literal once it has it. In other words, you can't count
on your parser generating RDF/XML. It might generate N3 or TURTLE, in
which case, you've lost all of your namespaces with the approach that
you took.

>> 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...

Mark, Shane - we should probably correct Section 6.3.1.3 to be more
in-line with the Test Cases.

-- manu

[1] http://www.w3.org/MarkUp/2008/ED-rdfa-syntax-20080501/#sec_6.3.1.2.

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.
blog: Dynamic Spectrum Auctions and Digital Marketplaces
http://blog.digitalbazaar.com/2008/04/24/dynamic-spectrum-auctions/
Received on Monday, 12 May 2008 16:18:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 12 May 2008 16:18:04 GMT