Proposed new test cases (Was: Re: RDFa Test Suite updates)

Julian Reschke wrote:
> [...]
> I think what's really important is whether comments (and PIs) should 
> trigger XMLLiterals; maybe they shouldn't?

I don't have a view on that, but it should be clear and consistently 
implemented, so here's some suggested test cases (in roughly the 
http://github.com/msporny/rdfa-test-suite/ format) which I believe match 
what the RDFa spec currently requires, and which I think should be added 
to the test suite:

1) Comment in node creates XMLLiteral. (Applies to both XHTML and HTML.)

   xmlns:ex="http://example.org/"
<head>
   <title>Test NNNN</title>
</head>
<body>
   <p property="ex:test">test <!-- example --> test</p>
</body>

ASK WHERE {
   <$TCPATH/NNNN.html> <http://example.org/test> "test <!-- example --> 
test"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>.
}

========

2) Processing instruction in node creates XMLLiteral. (Applies only to 
XHTML.)

   xmlns:ex="http://example.org/"
<head>
   <title>Test NNNN</title>
</head>
<body>
   <p property="ex:test">test <?example?> test</p>
</body>

ASK WHERE {
   <$TCPATH/NNNN.html> <http://example.org/test> "test <?example?> 
test"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>.
}

========

3) CDATA in node does not create XMLLiteral. (Applies only to XHTML.)

   xmlns:ex="http://example.org/"
<head>
   <title>Test NNNN</title>
</head>
<body>
   <p property="ex:test">test <![CDATA[example]]> test</p>
</body>

ASK WHERE {
   <$TCPATH/NNNN.html> <http://example.org/test> "test example test".
}

========

Current implementations give at least three different answers to the 
first test case, and at least two to the second. (I've not seen any do 
anything unexpected on the third, but I saw no other test case that uses 
CDATA so it seems worth having one.)

-- 
Philip Taylor
pjt47@cam.ac.uk

Received on Monday, 7 December 2009 16:28:06 UTC