Discrepancies between RDFa implementations [Was: Re: follow your nose, HTML widgets, GRDDL spec#issue-tx-elt, TAG issue xmlFunctions-34 [was: [RDFa] Use Case...]]

Dan Connolly wrote:
> 
> but I heard from Ivan that it produces different results
> from Elias's parser. Did he report that problem? Hmm...
> I can't find it in the -tf archives.
> 

Actually, no, I have contacted Fabien directly. But you are right, it
makes sense to document it here.

http://www.w3.org/People/Ivan/ is the original page where I detected the
problem. Part of the page is RDFa-d, the whole page is GRDDL-able
including the

http://www-sop.inria.fr/acacia/soft/RDFa2RDFXML.xsl

and there is a pointer to Elias' RDFa service

script.

The relevant XHTML portion is:

<div class id="me" role="foaf:Person" ...>
   <h1 property="foaf:name">Ivan Herman</h1>
   ...
   <p> .... <a rel="foaf:schoolHomepage" href="http://www.elte.hu">.....</a>
   ....
   </p>
</div>

The relevant portion as produced by Elias' script output is:

<foaf:Person rdf:about="http://www.w3.org/People/Ivan/#me">
   <foaf:name rdf:datatype="...XMLLiteral">Ivan Herman</foaf:name>
   ...
   <foaf:schoolHomepage rdf:resource="http://www.elte.hu"/>
</foaf:Person>

The relevant portion of Fabien's script output is (Fabien uses xml:base,
so "#me" is o.k.:

<rdf:Description xmlns:h="http://www.w3.org/1999/xhtml" rdf:about="#me">
   <foaf:name xmlns:foaf="http://xmlns.com/foaf/0.1/">Ivan
Herman</foaf:name>
</rdf:Description>
<rdf:Description xmlns:h="http://www.w3.org/1999/xhtml" rdf:about="">
    <foaf:schoolHomepage xmlns:foaf="http://xmlns.com/foaf/0.1/"
rdf:resource="http://www.elte.hu/"/>
</rdf:Description>


and I did not find anything that said

<#me> a foaf:Person.

In Fabien's output.

There are several issues here.

1. Elias's script assigns both literal and resource objects to the
subject identified by 'id' (see below on that one!), whereas Fabien does
it for literal objects and not for URI-s.

However, looking at the code again and having re-read the spec yesterday
I realised that the correct coding should have been

<div class id="me" about="#me"...>

having added that, both scripts assigns the same subjects.

What this means is that:

  - Elias' script is buggy, because it took into accound 'id' for all
the objects and it should not have
  - Fabien's script makes this mistake for part of the objects.

2. The 'role' attribute is not understood by Fabien's script

3. Elias' script assigns an XMLLiteral datatype, Fabien does not. Elias
follows the spec in this respect, but this has been reported elsewhere
and I think it is still an open issue[1] whether the spec should be kept
that way.

Caveat: I am not sure which RDFa version was taken into account by
Fabien and by Elias. All these may not be 'bugs' but design, just
referring to different versions of RDFa....

Ivan


[1] http://www.w3.org/mid/4549CAF0.8060506@w3.org



-- 

Ivan Herman, W3C Semantic Web Activity Lead
URL: http://www.w3.org/People/Ivan/
PGP Key: http://www.cwi.nl/%7Eivan/AboutMe/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Wednesday, 6 December 2006 09:57:52 UTC