Re: Test #0198 is invalid in RDFa 1.1

On Feb 7, 2012, at 7:10 AM, Ivan Herman wrote:

> The test looks as follows:
> 
> <html 
> prefix="foaf: http://xmlns.com/foaf/0.1/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>> 
>  <head>
> 	<title>Test 0198</title>
> 	<base href="http://www.example.org/me" />
> </head>
> <body>
>      <div id="mark" about="#mark" typeof="foaf:Person">
>        <h2 property="foaf:name" datatype="rdf:XMLLiteral"><span 
> property="foaf:firstName">Mark</span> <span 
> property="foaf:surname">Birbeck</span></h2>
>      </div>
> </body>
> </html>
> 
> The corresponding SPARQL says:
> 
> ASK WHERE {
> <http://www.example.org/me#mark> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
> <http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/name>
> "<span property=\"foaf:firstName\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">Mark</span> <span property=\"foaf:surname\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">Birbeck</span>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
> <http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/firstName> "Mark" .
> <http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/surname> "Birbeck" .
> }
> 
> However, that is not what RDFa 1.1 generates. Indeed, the RDFa processor sets the xmlns declarations in the XML Literal _only for the XML namespaces_ and not for the values of the @prefix statements. This is said in step 11 of the processing rules. Ie, the generated XML Literal is
> 
> @prefix foaf: <http://xmlns.com/foaf/0.1/> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> 
> <http://www.example.org/me#mark> a foaf:Person;
>    foaf:firstName "Mark";
>    foaf:name "<span property=\"foaf:firstName\">Mark</span> <span property=\"foaf:surname\">Birbeck</span>"^^rdf:XMLLiteral;
>    foaf:surname "Birbeck" .

Agreed that this is what should be generated, as there were no xmlns declarations to promote.

> We _could_ change the rules for the XML Literal part to include the @prefix declarations, too, but at some point we decided not to. I do not remember what were the exact reasons, I must admit, but I am not keen on reopening a technical issue. In any case, I think this test should not be used for RDFa 1.1.

I believe we decided not to because the rules for what to promote were getting out of hand. At this point, I think it would need to be @prefix and @vocab in addition to @xmlns, @lang and @xml:lang. I still think we shouldn't do this. The use of XMLLiteral in RDFa, IMO, is really to create structured literals, not to preserve the RDFa context in those literals.

> However, the test's real goal is to check that the processor goes 'down' the XML tree to generate Mark's name and surname. A possibility would be to modify the test and use xmlns instead of prefix, but that then the test should be disabled in HTML5.

Leave them as is, and just verify that triples are generated for foaf:firstName and foaf:lastName, as it does now.

Gregg

> Ivan
> 
> 
> 
> ----
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> FOAF: http://www.ivan-herman.net/foaf.rdf
> 
> 
> 
> 
> 

Received on Tuesday, 7 February 2012 18:01:49 UTC