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

Possible solutions for ISSUE 97

From: Ben Adida <ben@adida.net>
Date: Wed, 19 Mar 2008 16:16:39 -0700
Message-ID: <47E19ED7.1090706@adida.net>
To: public-rdf-in-xhtml-tf@w3.org


[I changed the subject from 87 to 97].

Ivan wrote:
> - However, an implementation of RDFa that produces an RDF graph in some 
> other serialization (which is the case for a number of our 
> implementations, though probably not all; it certainly true for Fabien's 
> xslt script, my stuff, probably Manu's code) has to produce a *valid* 
> serialized version of the RDF graph.

After some thought, I've become very wary of implementing a new data 
type (or even trying to find an existing one in a different space), and 
I agree with Ivan.

Yes, an RDFa parser produces an RDF graph. But an RDF graph is an 
abstract notion, so the only thing an RDFa parser *can* produce is 
*some* serialization of an RDF graph. As long as that serialization is 
*a* valid serialization of the correct RDF graph, the RDFa parser is 
compliant, in my opinion.

To be more specific, let's examine how we test an RDFa parser:
   (1) we run the RDFa parser on an input document,
   (2) we take the output of the parser and stuff it into a triple store,
   (3) we SPARQL against the triple store.

Steps (2) and (3) are part of the test harness, they're not part of the 
RDFa processor.

So, where does the XMLLiteral canonicalization happen? In my opinion, 
somewhere between (2) and (3), meaning somewhere in the triple store, 
*after* the RDFa parser has done its thing. After all, we don't expect 
the RDFa parser to provide a SPARQL interface, so why should it need to 
do XMLLiteral canonicalization if it's never performing graph operations?

So, regarding Test Case 11:

http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0011.xhtml

I believe we should include the xmlns declaration, and the SPARQL should 
read:

ASK WHERE {
	<http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0011.xhtml> 
<http://purl.org/dc/elements/1.1/creator> "Albert Einstein" .
	<http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0011.xhtml>
<http://purl.org/dc/elements/1.1/title>
"E = mc<sup xmlns=\"http://www.w3.org/1999/xhtml\">2</sup>: The Most 
Urgent Problem of Our 
Time"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .

}


-Ben


PS: when we implement RDFa in HTML5, we may have to deal with a 
different data type. This makes sense: we're extracting markup from the 
host language, so the type matches the host language. In the current 
case, it's XML.
Received on Wednesday, 19 March 2008 23:17:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:56 UTC