Bnode issues with 16 approved test cases

16 of the approved test cases are not correct due to the SPARQL not
testing for proper Bnode existence. We should also change the SPARQL
when querying Bnodes in the test cases to self-document itself more
clearly as well.

These are the test cases that are currently incorrect:

0033
0046
0047
0048
0050
0052
0053
0058
0064
0065
0081
0082
0083
0084
0088
0091

For example, TC 33 currently has the following SPARQL:

---------------------------------------------------------------------------
ASK WHERE {
<http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0033.xhtml>
   <http://purl.org/dc/elements/1.1/creator> _:bn0 .
      _:bn0 <http://xmlns.com/foaf/0.1/name> "Ben Adida" .
}
---------------------------------------------------------------------------

The problem is that even if a bnode is not created, and a named node is
created instead - the test still passes. I strongly suggest that we move
over to the SPARQL syntax that is used in the SPARQL Syntax Document for
querying (for best practice reasons). Here's what the above test should
be changed to:

---------------------------------------------------------------------------
ASK WHERE {
<http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0033.xhtml>
   <http://purl.org/dc/elements/1.1/creator> ?a .
      ?a <http://xmlns.com/foaf/0.1/name> "Ben Adida" .
FILTER ISBLANK(?a)
}
---------------------------------------------------------------------------

and here's TC 58 for a more complex example:

---------------------------------------------------------------------------
ASK WHERE {
<http://www.example.org/#ben>
   <http://xmlns.com/foaf/0.1/knows>
      ?a .
<http://www.example.org/#ben>
   <http://xmlns.com/foaf/0.1/knows>
      ?b .
?a
   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
      <http://xmlns.com/foaf/0.1/Person> .
?a
   <http://xmlns.com/foaf/0.1/name>
      "Mark Birbeck" .
?b
   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
      <http://xmlns.com/foaf/0.1/Person> .

?b
   <http://xmlns.com/foaf/0.1/name>
      "Ivan Herman" .
FILTER ISBLANK(?a)
FILTER ISBLANK(?b)
}
---------------------------------------------------------------------------

-- manu

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.
blog: DB Launches Medical Record Sales Service with Shepherd Medical
http://blog.digitalbazaar.com/2008/02/24/health2trade/

Received on Monday, 26 May 2008 18:50:26 UTC