Test Case #101 (v3): XMLLiteral with explicit namespace and xml:lang

Per our discussion and resolution on 5/29:

   RESOLUTION: Add valid cases of XML Literals as requested by
   implementers to TC 100-103 and add comments to tell other
   implementors that the tests may fail due to XML Literal issues.

The following SPARQL returns TRUE for librdfa and TRUE for PyRDFa.

====================== Test Case 101 =============================

---------------------Test Case 101 XHTML--------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:ex="http://example.org/rdf/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg">
 <head profile="http://www.w3.org/1999/xhtml/vocab#
http://www.w3.org/2005/10/profile">
  <title>Test 0101</title>
 </head>
  <body>
   <div about="http://www.example.org">
      <h2 property="ex:example" datatype="rdf:XMLLiteral"
xml:lang="fr">Du texte ici en <strong>gras</strong> et un rectangle en
svg: <svg:svg><svg:rect svg:width="200" svg:height="100"/></svg:svg></h2>
 </div>
  </body>
</html>
------------------------------------------------------------------

---------------------Test Case 101 SPARQL -----------------------
# Some parsers may generate XML Literals that differ from the ones
# shown below. The only requirement for XML Literal tests is that
# the RDF graph that is generated is equivalent to the one expressed
# in the XHTML (preservation of whitespace and namespaces that are
# utilized in the XML Literal).

ASK WHERE {
{
<http://www.example.org> <http://example.org/rdf/example> "Du texte ici
en <strong xmlns=\"http://www.w3.org/1999/xhtml\"
xmlns:dc=\"http://purl.org/dc/elements/1.1/\"
xmlns:ex=\"http://example.org/rdf/\"
xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"
xmlns:svg=\"http://www.w3.org/2000/svg\" xml:lang=\"fr\">gras</strong>
et un rectangle en svg: <svg:svg xmlns=\"http://www.w3.org/1999/xhtml\"
xmlns:dc=\"http://purl.org/dc/elements/1.1/\"
xmlns:ex=\"http://example.org/rdf/\"
xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"
xmlns:svg=\"http://www.w3.org/2000/svg\" xml:lang=\"fr\"><svg:rect
svg:width=\"200\"
svg:height=\"101\"></svg:rect></svg:svg>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>
.
}
UNION
{
<http://www.example.org> <http://example.org/rdf/example> "Du texte ici
en <strong xmlns=\"http://www.w3.org/1999/xhtml\"
xml:lang=\"fr\">gras</strong> et un rectangle en svg: <svg:svg
xmlns:svg=\"http://www.w3.org/2000/svg\" xml:lang=\"fr\"><svg:rect
svg:height=\"101\"
svg:width=\"200\"></svg:rect></svg:svg>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>
.
}
}
-----------------------------------------------------------------

-- 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 Wednesday, 11 June 2008 00:50:01 UTC