Error in test or error in spec?

This is what the CR phase is good for: reveal corner cases!

A simplified version of test #58 looks as follow (simplified, because in the original tests there were two, structurally identical foaf:Person statements, but it is unnecessary here):

    <div about="http://www.example.org/#ben" rel="foaf:knows">
      <p typeof="foaf:Person" property="foaf:name">Mark Birbeck</p>
      <p typeof="foaf:Person" property="foaf:name">Ivan Herman</p>
    </div>

The SPAQL test requires, essentially (I rewrote it in a somewhat more readable Turtle):

<http://www.example.org/#ben> <http://xmlns.com/foaf/0.1/knows> 
      [ 
	a <http://xmlns.com/foaf/0.1/Person> ;
	?a <http://xmlns.com/foaf/0.1/name> "Mark Birbeck" 
      ],
      [ 
	a <http://xmlns.com/foaf/0.1/Person> ;
	?a <http://xmlns.com/foaf/0.1/name> "Ivan Herman" 
      ] .

And I agree that this is what one would expect. (And that was also the case for RDFa 1.0.) However, this is not what the spec says:-( The relevant processing step is 5.1. New subject is set to @about or to the parent object; the presence of @typeof does _not_ change that; @typeof will create a new BNode that will be the object of the triples. The somewhat surprising outcome of the test will be, according to the spec:

<http://www.example.org/#ben> foaf:knows 
               [ foaf:name [ a foaf:Person ],
                           [ a foaf:Person ] ] .

This is, however, the outcome of the 'pattern' that we now have:

<div property="foaf:knows" typeof="foaf:Person">bla bla</div>

Ie, we have a backward incompatibility 'feature' but I think the spec is fine.

My conclusion for now: the test is wrong. We should redo altogether because, of course, with those values it looks weird and, I guess, the goal was to use it as a test for hanging rels:

   <div about="http://www.example.org/#ben" rel="foaf:knows">
      <p typeof="foaf:Person"><span property="foaf:name">Mark Birbeck</span></p>
      <p typeof="foaf:Person"><span property="foaf:name">Ivan Herman</span></p>
    </div>

which indeed results in 

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<http://www.example.org/#ben> foaf:knows [ a foaf:Person;
            foaf:name "Mark Birbeck" ],
        [ a foaf:Person;
            foaf:name "Ivan Herman" ] .

 

Thoughts?

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 Wednesday, 7 March 2012 10:11:07 UTC