Add XMLLiteral tests from RDFa and elsewhere.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Mon, 23 Dec 2013 15:45:12 -0800
changeset 1690 bfe203f4c28c
parent 1689 0d404b59d239
child 1691 6e48cca976b3
Add XMLLiteral tests from RDFa and elsewhere.
rdf-xml/tests/manifest.ttl
rdf-xml/tests/xmlliteral/test001.nt
rdf-xml/tests/xmlliteral/test001.rdf
rdf-xml/tests/xmlliteral/test002.nt
rdf-xml/tests/xmlliteral/test002.rdf
rdf-xml/tests/xmlliteral/test003.nt
rdf-xml/tests/xmlliteral/test003.rdf
rdf-xml/tests/xmlliteral/test004.nt
rdf-xml/tests/xmlliteral/test004.rdf
rdf-xml/tests/xmlliteral/test005.nt
rdf-xml/tests/xmlliteral/test005.rdf
rdf-xml/tests/xmlliteral/test006.nt
rdf-xml/tests/xmlliteral/test006.rdf
rdf-xml/tests/xmlliteral/test007.nt
rdf-xml/tests/xmlliteral/test007.rdf
rdf-xml/tests/xmlliteral/test008.nt
rdf-xml/tests/xmlliteral/test008.rdf
--- a/rdf-xml/tests/manifest.ttl	Mon Dec 23 14:36:22 2013 -0800
+++ b/rdf-xml/tests/manifest.ttl	Mon Dec 23 15:45:12 2013 -0800
@@ -184,6 +184,16 @@
     <#xmlbase-test011>
     <#xmlbase-test013>
     <#xmlbase-test014>
+
+    # New XMLLiteral tests (2013) -- gkellogg
+    <#xmlliteral-test001>
+    <#xmlliteral-test002>
+    <#xmlliteral-test003>
+    <#xmlliteral-test004>
+    <#xmlliteral-test005>
+    <#xmlliteral-test006>
+    <#xmlliteral-test007>
+    <#xmlliteral-test008>
   ) .
 
 <#amp-in-url-test001> a rdft:TestXMLEval;
@@ -1776,3 +1786,75 @@
   mf:action <xmlbase/test014.rdf>;
   mf:result <xmlbase/test014.nt> .
 
+<#xmlliteral-test001> a rdft:TestXMLEval;
+  mf:name "xmlliteral-test001";
+  rdfs:comment """
+    Basic XMLLiteral content with default namespace (based on RDFa test 0093)
+  """;
+  rdfs:approval rdft:Approved;
+  mf:action <xmlliteral/test001.rdf>;
+  mf:result <xmlliteral/test001.nt> .
+
+<#xmlliteral-test002> a rdft:TestXMLEval;
+  mf:name "xmlliteral-test002";
+  rdfs:comment """
+    Multiple default namespace elements (based on RDFa test 0198)
+  """;
+  rdfs:approval rdft:Approved;
+  mf:action <xmlliteral/test002.rdf>;
+  mf:result <xmlliteral/test002.nt> .
+
+<#xmlliteral-test003> a rdft:TestXMLEval;
+  mf:name "xmlliteral-test003";
+  rdfs:comment """
+    Whitespace preservation in XMLLiteral (based on RDFa test 0261)
+  """;
+  rdfs:approval rdft:Approved;
+  mf:action <xmlliteral/test003.rdf>;
+  mf:result <xmlliteral/test003.nt> .
+
+<#xmlliteral-test004> a rdft:TestXMLEval;
+  mf:name "xmlliteral-test004";
+  rdfs:comment """
+    No default namespace
+  """;
+  rdfs:approval rdft:Approved;
+  mf:action <xmlliteral/test004.rdf>;
+  mf:result <xmlliteral/test004.nt> .
+
+<#xmlliteral-test005> a rdft:TestXMLEval;
+  mf:name "xmlliteral-test005";
+  rdfs:comment """
+    Namespaced element
+  """;
+  rdfs:approval rdft:Approved;
+  mf:action <xmlliteral/test005.rdf>;
+  mf:result <xmlliteral/test005.nt> .
+
+<#xmlliteral-test006> a rdft:TestXMLEval;
+  mf:name "xmlliteral-test006";
+  rdfs:comment """
+    namespace and language
+  """;
+  rdfs:approval rdft:Approved;
+  mf:action <xmlliteral/test006.rdf>;
+  mf:result <xmlliteral/test006.nt> .
+
+<#xmlliteral-test007> a rdft:TestXMLEval;
+  mf:name "xmlliteral-test007";
+  rdfs:comment """
+    namespace and language with language on element
+  """;
+  rdfs:approval rdft:Approved;
+  mf:action <xmlliteral/test007.rdf>;
+  mf:result <xmlliteral/test007.nt> .
+
+<#xmlliteral-test008> a rdft:TestXMLEval;
+  mf:name "xmlliteral-test008";
+  rdfs:comment """
+    expand self-closing elements
+  """;
+  rdfs:approval rdft:Approved;
+  mf:action <xmlliteral/test008.rdf>;
+  mf:result <xmlliteral/test008.nt> .
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test001.nt	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,2 @@
+<http://www.w3.org/2013/RDFXMLTests/xmlliteral/test001.rdf#> <http://purl.org/dc/elements/1.1/creator> "Albert Einstein" .
+<http://www.w3.org/2013/RDFXMLTests/xmlliteral/test001.rdf#> <http://purl.org/dc/elements/1.1/title> "\n      E = mc<sup xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:ex=\"http://www.example.org/\">2</sup>: The Most Urgent Problem of Our Time\n    "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test001.rdf	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en
+  Automatique, Keio University).
+ 
+  All Rights Reserved.
+ 
+  Please see the full Copyright clause at
+  <http://www.w3.org/Consortium/Legal/copyright-software.html>
+
+  Description:
+    Basic XMLLiteral content with default namespace (based on RDFa test 0093)
+-->
+<rdf:RDF xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:ex="http://www.example.org/">
+  <rdf:Description rdf:ID="">
+    <dc:creator>Albert Einstein</dc:creator>
+    <dc:title rdf:parseType="Literal">
+      E = mc<sup>2</sup>: The Most Urgent Problem of Our Time
+    </dc:title>
+  </rdf:Description>
+</rdf:RDF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test002.nt	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,2 @@
+<http://example/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example/> <http://xmlns.com/foaf/0.1/name> "\n      <span xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\">Gregg</span>\n      <span xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\">Kellogg</span>\n    "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test002.rdf	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en
+  Automatique, Keio University).
+ 
+  All Rights Reserved.
+ 
+  Please see the full Copyright clause at
+  <http://www.w3.org/Consortium/Legal/copyright-software.html>
+
+  Description:
+    Multiple default namespace elements (based on RDFa test 0198)
+-->
+<rdf:RDF xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <foaf:Person rdf:about="http://example/">
+    <foaf:name rdf:parseType="Literal">
+      <span>Gregg</span>
+      <span>Kellogg</span>
+    </dc:title>
+  </rdf:Description>
+</rdf:RDF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test003.nt	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,1 @@
+<http://www.example.org> <http://www.example.org/xmllit> "This is\nan XMLLiteral"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test003.rdf	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en
+  Automatique, Keio University).
+ 
+  All Rights Reserved.
+ 
+  Please see the full Copyright clause at
+  <http://www.w3.org/Consortium/Legal/copyright-software.html>
+
+  Description:
+    Whitespace preservation in XMLLiteral (based on RDFa test 0261)
+-->
+<rdf:RDF xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:ex="http://www.example.org/">
+  <rdf:Description rdf:about="http://www.example.org">
+    <ex:xmllit rdf:parseType="Literal">This is
+an XMLLiteral</ex:xmllit>
+  </rdf:Description>
+</rdf:RDF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test004.nt	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,1 @@
+<http://example/> <http://www.example.org/xmllit> "\n      foo <sup xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:ex=\"http://www.example.org/\">bar</sup> baz!\n    "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test004.rdf	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en
+  Automatique, Keio University).
+ 
+  All Rights Reserved.
+ 
+  Please see the full Copyright clause at
+  <http://www.w3.org/Consortium/Legal/copyright-software.html>
+
+  Description:
+    No default namespace
+-->
+<rdf:RDF xmlns="http://www.w3.org/1999/xhtml"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:ex="http://www.example.org/">
+  <rdf:Description rdf:about="http://example/">
+    <ex:xmllit rdf:parseType="Literal">
+      foo <sup>bar</sup> baz!
+    </ex:xmllit>
+  </rdf:Description>
+</rdf:RDF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test005.nt	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,1 @@
+<http://example/> <http://www.example.org/xmllit> "\n      foo <dc:sup xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:ex=\"http://www.example.org/\">bar</dc:sup> baz!\n    "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test005.rdf	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en
+  Automatique, Keio University).
+ 
+  All Rights Reserved.
+ 
+  Please see the full Copyright clause at
+  <http://www.w3.org/Consortium/Legal/copyright-software.html>
+
+  Description:
+    Namespaced element
+-->
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:ex="http://www.example.org/">
+  <rdf:Description rdf:about="http://example/">
+    <ex:xmllit rdf:parseType="Literal">
+      foo <dc:sup>bar</dc:sup> baz!
+    </ex:xmllit>
+  </rdf:Description>
+</rdf:RDF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test006.nt	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,1 @@
+<http://example/> <http://www.example.org/xmllit> "\n      foo <dc:sup xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:ex=\"http://www.example.org/\" xml:lang=\"fr\">bar</dc:sup> baz!\n    "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test006.rdf	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en
+  Automatique, Keio University).
+ 
+  All Rights Reserved.
+ 
+  Please see the full Copyright clause at
+  <http://www.w3.org/Consortium/Legal/copyright-software.html>
+
+  Description:
+    namespace and language
+-->
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:ex="http://www.example.org/">
+  <rdf:Description rdf:about="http://example/" xml:lang="fr">
+    <ex:xmllit rdf:parseType="Literal">
+      foo <dc:sup>bar</dc:sup> baz!
+    </ex:xmllit>
+  </rdf:Description>
+</rdf:RDF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test007.nt	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,1 @@
+<http://example/> <http://www.example.org/xmllit> "\n      foo <dc:sup xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:ex=\"http://www.example.org/\" xml:lang=\"fr\">bar</dc:sup> <dc:sub xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:ex=\"http://www.example.org/\" xml:lang=\"en\">baz!</dc:sub>\n    "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test007.rdf	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en
+  Automatique, Keio University).
+ 
+  All Rights Reserved.
+ 
+  Please see the full Copyright clause at
+  <http://www.w3.org/Consortium/Legal/copyright-software.html>
+
+  Description:
+    namespace and language with language on element
+-->
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:ex="http://www.example.org/">
+  <rdf:Description rdf:about="http://example/" xml:lang="fr">
+    <ex:xmllit rdf:parseType="Literal">
+      foo <dc:sup>bar</dc:sup> <dc:sub xml:lang="en">baz!</dc:sub>
+    </ex:xmllit>
+  </rdf:Description>
+</rdf:RDF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test008.nt	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,1 @@
+<http://example/> <http://www.w3.org/XML/1998/namespaceex:xmllit> "\n      <rdf:nil xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xml:lang=\"fr\"></rdf:nil>\n    "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-xml/tests/xmlliteral/test008.rdf	Mon Dec 23 15:45:12 2013 -0800
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en
+  Automatique, Keio University).
+ 
+  All Rights Reserved.
+ 
+  Please see the full Copyright clause at
+  <http://www.w3.org/Consortium/Legal/copyright-software.html>
+
+  Description:
+    expand self-closing elements
+-->
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+  <rdf:Description rdf:about="http://example/" xml:lang="fr">
+    <ex:xmllit rdf:parseType="Literal">
+      <rdf:nil/>
+    </ex:xmllit>
+  </rdf:Description>
+</rdf:RDF>