W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > December 2009

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

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Mon, 07 Dec 2009 16:27:32 +0000
Message-ID: <4B1D2CF4.2070501@cam.ac.uk>
To: RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
CC: Manu Sporny <msporny@digitalbazaar.com>, Julian Reschke <julian.reschke@gmx.de>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 16:28:07 GMT