diff options
Diffstat (limited to 'libxml2/test/c14n')
150 files changed, 1701 insertions, 0 deletions
diff --git a/libxml2/test/c14n/1-1-without-comments/doc.dtd b/libxml2/test/c14n/1-1-without-comments/doc.dtd new file mode 100755 index 0000000..c460239 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/doc.dtd @@ -0,0 +1 @@ +<!-- Empty DTD -->
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/example-1.xml b/libxml2/test/c14n/1-1-without-comments/example-1.xml new file mode 100755 index 0000000..ed450c7 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-1.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> + +<?xml-stylesheet href="doc.xsl" + type="text/xsl" ?> + +<!DOCTYPE doc SYSTEM "doc.dtd"> + +<doc>Hello, world!<!-- Comment 1 --></doc> + +<?pi-without-data ?> + +<!-- Comment 2 --> + +<!-- Comment 3 --> diff --git a/libxml2/test/c14n/1-1-without-comments/example-2.xml b/libxml2/test/c14n/1-1-without-comments/example-2.xml new file mode 100755 index 0000000..74eeea1 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-2.xml @@ -0,0 +1,11 @@ +<doc> + <clean> </clean> + <dirty> A B </dirty> + <mixed> + A + <clean> </clean> + B + <dirty> A B </dirty> + C + </mixed> +</doc> diff --git a/libxml2/test/c14n/1-1-without-comments/example-3.xml b/libxml2/test/c14n/1-1-without-comments/example-3.xml new file mode 100755 index 0000000..a7a1950 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-3.xml @@ -0,0 +1,18 @@ +<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]> +<doc> + <e1 /> + <e2 ></e2> + <e3 name = "elem3" id="elem3" /> + <e4 name="elem4" id="elem4" ></e4> + <e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm" + xmlns:b="http://www.ietf.org" + xmlns:a="http://www.w3.org" + xmlns="http://www.uvic.ca"/> + <e6 xmlns="" xmlns:a="http://www.w3.org"> + <e7 xmlns="http://www.ietf.org"> + <e8 xmlns="" xmlns:a="http://www.w3.org"> + <e9 xmlns="" xmlns:a="http://www.ietf.org"/> + </e8> + </e7> + </e6> +</doc> diff --git a/libxml2/test/c14n/1-1-without-comments/example-4.xml b/libxml2/test/c14n/1-1-without-comments/example-4.xml new file mode 100755 index 0000000..3fba138 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-4.xml @@ -0,0 +1,9 @@ +<!DOCTYPE doc [<!ATTLIST normId id ID #IMPLIED>]> +<doc> + <text>First line
 Second line</text> + <value>2</value> + <compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute> + <compute expr='value>"0" && value<"10" ?"valid":"error"'>valid</compute> + <norm attr=' '   
	 ' '/> + <normId id=' '   
	 ' '/> +</doc> diff --git a/libxml2/test/c14n/1-1-without-comments/example-5.xml b/libxml2/test/c14n/1-1-without-comments/example-5.xml new file mode 100755 index 0000000..92c5322 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-5.xml @@ -0,0 +1,12 @@ +<!DOCTYPE doc [ +<!ATTLIST doc attrExtEnt ENTITY #IMPLIED> +<!ENTITY ent1 "Hello"> +<!ENTITY ent2 SYSTEM "world.txt"> +<!ENTITY entExt SYSTEM "earth.gif" NDATA gif> +<!NOTATION gif SYSTEM "viewgif.exe"> +]> +<doc attrExtEnt="entExt"> + &ent1;, &ent2;! +</doc> + +<!-- Let world.txt contain "world" (excluding the quotes) --> diff --git a/libxml2/test/c14n/1-1-without-comments/example-6.xml b/libxml2/test/c14n/1-1-without-comments/example-6.xml new file mode 100755 index 0000000..31e2071 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-6.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<doc>©</doc> diff --git a/libxml2/test/c14n/1-1-without-comments/example-7.xml b/libxml2/test/c14n/1-1-without-comments/example-7.xml new file mode 100755 index 0000000..41171cb --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-7.xml @@ -0,0 +1,11 @@ +<!DOCTYPE doc [ +<!ATTLIST e2 xml:space (default|preserve) 'preserve'> +<!ATTLIST e3 id ID #IMPLIED> +]> +<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <e1> + <e2 xmlns=""> + <e3 id="E3"/> + </e2> + </e1> +</doc> diff --git a/libxml2/test/c14n/1-1-without-comments/example-7.xpath b/libxml2/test/c14n/1-1-without-comments/example-7.xpath new file mode 100755 index 0000000..84ddb08 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-7.xpath @@ -0,0 +1,10 @@ +<XPath xmlns:ietf="http://www.ietf.org" > + (//.|//@*|//namespace::*) + [ + self::ietf:e1 + or + (parent::ietf:e1 and not(self::text() or self::e2)) + or + count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node()) + ] +</XPath>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/example-8.xml b/libxml2/test/c14n/1-1-without-comments/example-8.xml new file mode 100755 index 0000000..a07f6c7 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-8.xml @@ -0,0 +1,11 @@ +<!DOCTYPE doc [ +<!ATTLIST e2 xml:space (default|preserve) 'preserve'> +<!ATTLIST e3 id ID #IMPLIED> +]> +<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="something/else"> + <e1> + <e2 xmlns="" xml:id="abc" xml:base="bar/"> + <e3 id="E3" xml:base="foo"/> + </e2> + </e1> +</doc> diff --git a/libxml2/test/c14n/1-1-without-comments/example-8.xpath b/libxml2/test/c14n/1-1-without-comments/example-8.xpath new file mode 100755 index 0000000..84ddb08 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/example-8.xpath @@ -0,0 +1,10 @@ +<XPath xmlns:ietf="http://www.ietf.org" > + (//.|//@*|//namespace::*) + [ + self::ietf:e1 + or + (parent::ietf:e1 and not(self::text() or self::e2)) + or + count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node()) + ] +</XPath>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/world.txt b/libxml2/test/c14n/1-1-without-comments/world.txt new file mode 100755 index 0000000..04fea06 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/world.txt @@ -0,0 +1 @@ +world
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec-102.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec-102.xml new file mode 100644 index 0000000..18b7c75 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec-102.xml @@ -0,0 +1,16 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-c14n11spec-102 + +Check that correct xml:base fixup is performed. +--> +<!DOCTYPE doc [ + <!ATTLIST e2 xml:space (default|preserve) 'preserve'> + <!ATTLIST e3 id ID #IMPLIED> +]> +<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://www.example.com/something/else"> + <e1> + <e2 xmlns="" xml:id="abc" xml:base="../bar/"> + <e3 id="E3" xml:base="foo"/> + </e2> + </e1> +</doc>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec-102.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec-102.xpath new file mode 100644 index 0000000..e919acc --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec-102.xpath @@ -0,0 +1,9 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-c14n11spec-102 + +Check that correct xml:base fixup is performed. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec2-102.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec2-102.xml new file mode 100644 index 0000000..d271afd --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec2-102.xml @@ -0,0 +1,16 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-c14n11spec2-102 + +Check that correct xml:base fixup is performed. +--> +<!DOCTYPE doc [ + <!ATTLIST e2 xml:space (default|preserve) 'preserve'> + <!ATTLIST e3 id ID #IMPLIED> +]> +<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="something/else"> + <e1> + <e2 xmlns="" xml:id="abc" xml:base="bar/"> + <e3 id="E3" xml:base="foo"/> + </e2> + </e1> +</doc>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec2-102.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec2-102.xpath new file mode 100644 index 0000000..cdaad3e --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec2-102.xpath @@ -0,0 +1,9 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-c14n11spec2-102 + +Check that correct xml:base fixup is performed. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[self::ietf:e1 or (parent::ietf:e1 and not(self::text() or self::e2)) or count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec3-102.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec3-102.xml new file mode 100644 index 0000000..f46e1e9 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec3-102.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-c14n11spec3-102 + +Check that correct xml:base fixup is performed. +--> +<a xml:base="foo/bar"> + <b xml:base=".."> + <c xml:base=".."> + <d xml:base="x"> + </d> + </c> + </b> +</a> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec3-102.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec3-102.xpath new file mode 100644 index 0000000..1d8dd71 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-c14n11spec3-102.xpath @@ -0,0 +1,9 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-c14n11spec2-102 + +Check that correct xml:base fixup is performed. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[self::a or ancestor-or-self::d] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-1.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-1.xml new file mode 100755 index 0000000..24a899b --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-1.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-1 + +Check that implementations of [XML-C14N1.1] work properly when the +xml:base origin appears in the output document subset and also children +with xml:base, which do not require further processing, are also present. +--> +<ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://xmlbase.example.org/xmlbase0/"> + <ietf:e1 xml:base="/xmlbase1/"> + <ietf:e11 xml:base="/xmlbase11/"> + <ietf:e111 xml:base="/xmlbase111/"/> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 xml:base="/xmlbase121/"/> + </ietf:e12> + </ietf:e1> + <ietf:e2> + <ietf:e21 xml:base="/xmlbase21/"/> + </ietf:e2> + <ietf:e3> + <ietf:e31 at="3"/> + </ietf:e3> +</ietf:c14n11XmlBaseDoc1> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-1.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-1.xpath new file mode 100755 index 0000000..168e98d --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-1.xpath @@ -0,0 +1,11 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-1 + +Check that implementations of [XML-C14N1.1] work properly when the +xml:base origin appears in the output document subset and also children +with xml:base, which do not require further processing, are also present. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e2)] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-2.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-2.xml new file mode 100755 index 0000000..4c85329 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-2.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-2 + +Check that implementations of [XML-C14N1.1] properly build the xml:base +at the first level (ietf:e1). +--> +<ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://xmlbase.example.org/xmlbase0/"> + <ietf:e1 xml:base="/xmlbase1/"> + <ietf:e11 xml:base="/xmlbase11/"> + <ietf:e111 xml:base="/xmlbase111/"/> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 xml:base="/xmlbase121/"/> + </ietf:e12> + </ietf:e1> + <ietf:e2> + <ietf:e21 xml:base="/xmlbase21/"/> + </ietf:e2> + <ietf:e3> + <ietf:e31 at="3"/> + </ietf:e3> +</ietf:c14n11XmlBaseDoc1> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-2.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-2.xpath new file mode 100755 index 0000000..fdab085 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-2.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-2 + +Check that implementations of [XML-C14N1.1] properly build the xml:base +at the first level (ietf:e1). +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e1] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-3.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-3.xml new file mode 100755 index 0000000..19ce738 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-3.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-3 + +Check that implementations of [XML-C14N1.1] properly build the xml:base +if one of intermediate the levels (ietf:e1) are absent from the document +subset. +--> +<ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://xmlbase.example.org/xmlbase0/"> + <ietf:e1 xml:base="/xmlbase1/"> + <ietf:e11 xml:base="/xmlbase11/"> + <ietf:e111 xml:base="/xmlbase111/"/> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 xml:base="/xmlbase121/"/> + </ietf:e12> + </ietf:e1> + <ietf:e2> + <ietf:e21 xml:base="/xmlbase21/"/> + </ietf:e2> + <ietf:e3> + <ietf:e31 at="3"/> + </ietf:e3> +</ietf:c14n11XmlBaseDoc1> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-3.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-3.xpath new file mode 100755 index 0000000..de87508 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-3.xpath @@ -0,0 +1,11 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-3 + +Check that implementations of [XML-C14N1.1] properly build the xml:base +if one of intermediate the levels (ietf:e1) are absent from the document +subset. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e11] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-4.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-4.xml new file mode 100755 index 0000000..57e4436 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-4.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-4 + +Check that implementations of [XML-C14N1.1] properly build the xml:base +if several intermediate levels (ietf:e1 and ietf:e11) are absent from +the document subset. +--> +<ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://xmlbase.example.org/xmlbase0/"> + <ietf:e1 xml:base="/xmlbase1/"> + <ietf:e11 xml:base="/xmlbase11/"> + <ietf:e111 xml:base="/xmlbase111/"/> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 xml:base="/xmlbase121/"/> + </ietf:e12> + </ietf:e1> + <ietf:e2> + <ietf:e21 xml:base="/xmlbase21/"/> + </ietf:e2> + <ietf:e3> + <ietf:e31 at="3"/> + </ietf:e3> +</ietf:c14n11XmlBaseDoc1> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-4.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-4.xpath new file mode 100755 index 0000000..818ef10 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-4.xpath @@ -0,0 +1,11 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-4 + +Check that implementations of [XML-C14N1.1] properly build the xml:base +if several intermediate levels (ietf:e1 and ietf:e11) are absent from +the document subset. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e111] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-5.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-5.xml new file mode 100755 index 0000000..f92a897 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-5.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-5 + +Check that implementations of [XML-C14N1.1] properly build the xml:base +if one intermediate level (ietf:e2) without any xml:base attribute is absent +from the document subset. +--> +<ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://xmlbase.example.org/xmlbase0/"> + <ietf:e1 xml:base="/xmlbase1/"> + <ietf:e11 xml:base="/xmlbase11/"> + <ietf:e111 xml:base="/xmlbase111/"/> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 xml:base="/xmlbase121/"/> + </ietf:e12> + </ietf:e1> + <ietf:e2> + <ietf:e21 xml:base="/xmlbase21/"/> + </ietf:e2> + <ietf:e3> + <ietf:e31 at="3"/> + </ietf:e3> +</ietf:c14n11XmlBaseDoc1> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-5.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-5.xpath new file mode 100755 index 0000000..7020803 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-5.xpath @@ -0,0 +1,11 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-5 + +Check that implementations of [XML-C14N1.1] properly build the xml:base +if one intermediate level (ietf:e2) without any xml:base attribute is absent +from the document subset. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e21] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-6.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-6.xml new file mode 100755 index 0000000..62824f9 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-6.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-6 + +Check that implementations of [XML-C14N1.1] properly build the xml:base in +one element that originally had no xml:base attribute. +--> +<ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://xmlbase.example.org/xmlbase0/"> + <ietf:e1 xml:base="/xmlbase1/"> + <ietf:e11 xml:base="/xmlbase11/"> + <ietf:e111 xml:base="/xmlbase111/"/> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 xml:base="/xmlbase121/"/> + </ietf:e12> + </ietf:e1> + <ietf:e2> + <ietf:e21 xml:base="/xmlbase21/"/> + </ietf:e2> + <ietf:e3> + <ietf:e31 at="3"/> + </ietf:e3> +</ietf:c14n11XmlBaseDoc1> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-6.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-6.xpath new file mode 100755 index 0000000..2b93c64 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-6.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-6 + +Check that implementations of [XML-C14N1.1] properly build the xml:base in +one element that originally had no xml:base attribute. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e3] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-7.xml b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-7.xml new file mode 100755 index 0000000..ee13916 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-7.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-7 + +Check that implementations of [XML-C14N1.1] do not pass the xml:base +to another element when it is not necessary. +--> +<ietf:c14n11XmlBaseDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="http://xmlbase.example.org/xmlbase0/"> + <ietf:e1 xml:base="/xmlbase1/"> + <ietf:e11 xml:base="/xmlbase11/"> + <ietf:e111 xml:base="/xmlbase111/"/> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 xml:base="/xmlbase121/"/> + </ietf:e12> + </ietf:e1> + <ietf:e2> + <ietf:e21 xml:base="/xmlbase21/"/> + </ietf:e2> + <ietf:e3> + <ietf:e31 at="3"/> + </ietf:e3> +</ietf:c14n11XmlBaseDoc1> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-7.xpath b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-7.xpath new file mode 100755 index 0000000..7d37ab8 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlbase-prop-7.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#c14n11xmlbase-prop-7 + +Check that implementations of [XML-C14N1.1] do not pass the xml:base +to another element when it is not necessary. +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:c14n11XmlBaseDoc1 and not(ancestor-or-self::ietf:e1 or ancestor-or-self::ietf:e2)] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlid-prop-1.xml b/libxml2/test/c14n/1-1-without-comments/xmlid-prop-1.xml new file mode 100644 index 0000000..ca58c2b --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlid-prop-1.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLID + +Check that implementations of [XML-C14N1.1] handle xml:id attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11XmlIdDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:id="IdInterop"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11XmlIdDoc1>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlid-prop-1.xpath b/libxml2/test/c14n/1-1-without-comments/xmlid-prop-1.xpath new file mode 100755 index 0000000..dc5573c --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlid-prop-1.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLID + +Check that implementations of [XML-C14N1.1] handle xml:id attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e1] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlid-prop-2.xml b/libxml2/test/c14n/1-1-without-comments/xmlid-prop-2.xml new file mode 100644 index 0000000..ca58c2b --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlid-prop-2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLID + +Check that implementations of [XML-C14N1.1] handle xml:id attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11XmlIdDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:id="IdInterop"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11XmlIdDoc1>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlid-prop-2.xpath b/libxml2/test/c14n/1-1-without-comments/xmlid-prop-2.xpath new file mode 100755 index 0000000..bed44b7 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlid-prop-2.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLID + +Check that implementations of [XML-C14N1.1] handle xml:id attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmllang-prop-1.xml b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-1.xml new file mode 100644 index 0000000..1111e33 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-1.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLLANG + +Check that implementations of [XML-C14N1.1] handle xml:lang attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11Xmllang xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:lang="EN"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11Xmllang>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmllang-prop-1.xpath b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-1.xpath new file mode 100755 index 0000000..224924e --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-1.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLLANG + +Check that implementations of [XML-C14N1.1] handle xml:lang attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e1] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmllang-prop-2.xml b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-2.xml new file mode 100644 index 0000000..1111e33 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLLANG + +Check that implementations of [XML-C14N1.1] handle xml:lang attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11Xmllang xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:lang="EN"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11Xmllang>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmllang-prop-2.xpath b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-2.xpath new file mode 100755 index 0000000..ca21758 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-2.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLLANG + +Check that implementations of [XML-C14N1.1] handle xml:lang attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e2] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmllang-prop-3.xml b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-3.xml new file mode 100644 index 0000000..1111e33 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-3.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLLANG + +Check that implementations of [XML-C14N1.1] handle xml:lang attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11Xmllang xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:lang="EN"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11Xmllang>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmllang-prop-3.xpath b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-3.xpath new file mode 100755 index 0000000..86e77fa --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-3.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLLANG + +Check that implementations of [XML-C14N1.1] handle xml:lang attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e11] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmllang-prop-4.xml b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-4.xml new file mode 100644 index 0000000..1111e33 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-4.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLLANG + +Check that implementations of [XML-C14N1.1] handle xml:lang attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11Xmllang xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:lang="EN"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11Xmllang>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmllang-prop-4.xpath b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-4.xpath new file mode 100755 index 0000000..fdc7661 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmllang-prop-4.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLLANG + +Check that implementations of [XML-C14N1.1] handle xml:lang attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-1.xml b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-1.xml new file mode 100644 index 0000000..62da9e4 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-1.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLSPACE + +Check that implementations of [XML-C14N1.1] handle xml:space attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11XmlSpaceDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:space="true"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11XmlSpaceDoc1>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-1.xpath b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-1.xpath new file mode 100755 index 0000000..bad373a --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-1.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLSPACE + +Check that implementations of [XML-C14N1.1] handle xml:space attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e1] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-2.xml b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-2.xml new file mode 100644 index 0000000..62da9e4 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLSPACE + +Check that implementations of [XML-C14N1.1] handle xml:space attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11XmlSpaceDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:space="true"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11XmlSpaceDoc1>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-2.xpath b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-2.xpath new file mode 100755 index 0000000..ffb7d85 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-2.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLSPACE + +Check that implementations of [XML-C14N1.1] handle xml:space attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e2] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-3.xml b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-3.xml new file mode 100644 index 0000000..62da9e4 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-3.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLSPACE + +Check that implementations of [XML-C14N1.1] handle xml:space attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11XmlSpaceDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:space="true"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11XmlSpaceDoc1>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-3.xpath b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-3.xpath new file mode 100755 index 0000000..3f27aed --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-3.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLSPACE + +Check that implementations of [XML-C14N1.1] handle xml:space attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e11] +</XPath> diff --git a/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-4.xml b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-4.xml new file mode 100644 index 0000000..62da9e4 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-4.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLSPACE + +Check that implementations of [XML-C14N1.1] handle xml:space attributes +as defined in [XML-C14N1.1] +--> +<ietf:c14n11XmlSpaceDoc1 xmlns:ietf="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <ietf:e1 xml:space="true"> + <ietf:e11> + <ietf:e111 /> + </ietf:e11> + <ietf:e12 at="2"> + <ietf:e121 /> + </ietf:e12> + </ietf:e1> + <ietf:e2 > + <ietf:e21 /> + </ietf:e2> +</ietf:c14n11XmlSpaceDoc1>
\ No newline at end of file diff --git a/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-4.xpath b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-4.xpath new file mode 100755 index 0000000..49c4395 --- /dev/null +++ b/libxml2/test/c14n/1-1-without-comments/xmlspace-prop-4.xpath @@ -0,0 +1,10 @@ +<!-- +http://www.w3.org/TR/xmldsig2ed-tests/#XMLSPACE + +Check that implementations of [XML-C14N1.1] handle xml:space attributes +as defined in [XML-C14N1.1] +--> +<XPath xmlns:ietf="http://www.ietf.org" > +(//. | //@* | //namespace::*) +[ancestor-or-self::ietf:e11 or ancestor-or-self::ietf:e12] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-09.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-09.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-09.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-09.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-09.xpath new file mode 100644 index 0000000..717b66a --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-09.xpath @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- everything --> + ancestor-or-self::bar:Something + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-10.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-10.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-10.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-10.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-10.xpath new file mode 100644 index 0000000..8ea2795 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-10.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements or directly-used namespace nodes --> + ancestor-or-self::bar:Something and + ((name() != "bar") or parent::bar:Something) and + ((name() != "foo") or parent::foo:Something) and + ((name() != "baz") or parent::baz:Something) and + ((name() != "") or self::text()) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-11.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-11.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-11.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-11.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-11.xpath new file mode 100644 index 0000000..37d65e0 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-11.xpath @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements or directly-used namespace nodes --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "") or + (string(self::node()) = namespace-uri(parent::node()))) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-12.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-12.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-12.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-12.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-12.xpath new file mode 100644 index 0000000..ed8ae68 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-12.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements, or directly-used namespace nodes but not foo:Something --> + ancestor-or-self::bar:Something and + not (self::foo:Something) and + (self::text() or + (namespace-uri() != "") or + (string(self::node()) = namespace-uri(parent::node()))) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-13.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-13.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-13.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-13.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-13.xpath new file mode 100644 index 0000000..7d0170b --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-13.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes; I am not in my parent's namespace axis --> + ancestor-or-self::bar:Something and + (count(parent::node()/namespace::*) != + count(parent::node()/namespace::* | self::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-14.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-14.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-14.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-14.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-14.xpath new file mode 100644 index 0000000..2732894 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-14.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes; I am text or have nonempty namespace URI --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "")) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-15.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-15.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-15.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-15.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-15.xpath new file mode 100644 index 0000000..ae6589e --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-15.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only namespace nodes --> + ancestor-or-self::bar:Something and + (count(parent::node()/namespace::*) = + count(parent::node()/namespace::* | self::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-16.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-16.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-16.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-16.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-16.xpath new file mode 100644 index 0000000..bdca528 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-16.xpath @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only directly-used namespace nodes --> + ancestor-or-self::bar:Something and + (string(self::node()) = namespace-uri(parent::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-17.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-17.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-17.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-17.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-17.xpath new file mode 100644 index 0000000..24fdd3f --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-17.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes but the default on alternate elements --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "") or + ((name() = "") and + ((count(ancestor-or-self::node()) mod 2) = 1))) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.xpath new file mode 100644 index 0000000..717b66a --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-18.xpath @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- everything --> + ancestor-or-self::bar:Something + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.xpath new file mode 100644 index 0000000..8ea2795 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-19.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements or directly-used namespace nodes --> + ancestor-or-self::bar:Something and + ((name() != "bar") or parent::bar:Something) and + ((name() != "foo") or parent::foo:Something) and + ((name() != "baz") or parent::baz:Something) and + ((name() != "") or self::text()) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.xpath new file mode 100644 index 0000000..37d65e0 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-20.xpath @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements or directly-used namespace nodes --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "") or + (string(self::node()) = namespace-uri(parent::node()))) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.xpath new file mode 100644 index 0000000..ed8ae68 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-21.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements, or directly-used namespace nodes but not foo:Something --> + ancestor-or-self::bar:Something and + not (self::foo:Something) and + (self::text() or + (namespace-uri() != "") or + (string(self::node()) = namespace-uri(parent::node()))) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.xpath new file mode 100644 index 0000000..7d0170b --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-22.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes; I am not in my parent's namespace axis --> + ancestor-or-self::bar:Something and + (count(parent::node()/namespace::*) != + count(parent::node()/namespace::* | self::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.xpath new file mode 100644 index 0000000..2732894 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-23.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes; I am text or have nonempty namespace URI --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "")) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.xpath new file mode 100644 index 0000000..ae6589e --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-24.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only namespace nodes --> + ancestor-or-self::bar:Something and + (count(parent::node()/namespace::*) = + count(parent::node()/namespace::* | self::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.xpath new file mode 100644 index 0000000..bdca528 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-25.xpath @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only directly-used namespace nodes --> + ancestor-or-self::bar:Something and + (string(self::node()) = namespace-uri(parent::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.ns b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.ns new file mode 100644 index 0000000..3886aed --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.ns @@ -0,0 +1 @@ +#default
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.xml b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.xpath b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.xpath new file mode 100644 index 0000000..24fdd3f --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/merlin-c14n-two-26.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes but the default on alternate elements --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "") or + ((name() = "") and + ((count(ancestor-or-self::node()) mod 2) = 1))) + ] +</XPath> diff --git a/libxml2/test/c14n/exc-without-comments/test-0.xml b/libxml2/test/c14n/exc-without-comments/test-0.xml new file mode 100644 index 0000000..c7c42d9 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/test-0.xml @@ -0,0 +1,18 @@ +<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]> +<doc xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/"> + <e1 /> + <e2 ></e2> + <e3 name = "elem3" id="elem3" /> + <e4 name="elem4" id="elem4" ></e4> + <e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm" + xmlns:b="http://www.ietf.org" + xmlns:a="http://www.w3.org" + xmlns="http://example.org"/> + <e6 xmlns="" test="../baz" xmlns:a="http://www.w3.org"> + <e7 xmlns="http://www.ietf.org"> + <e8 xmlns="" xmlns:a="http://www.w3.org" a:foo="bar"> + <e9 xmlns="" xmlns:a="http://www.ietf.org"/> + </e8> + </e7> + </e6> +</doc> diff --git a/libxml2/test/c14n/exc-without-comments/test-0.xpath b/libxml2/test/c14n/exc-without-comments/test-0.xpath new file mode 100644 index 0000000..faa0070 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/test-0.xpath @@ -0,0 +1,3 @@ +<XPath> +(//. | //@* | //namespace::*)[ancestor-or-self::e6] +</XPath>
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/test-1.ns b/libxml2/test/c14n/exc-without-comments/test-1.ns new file mode 100644 index 0000000..2e65efe --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/test-1.ns @@ -0,0 +1 @@ +a
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/test-1.xml b/libxml2/test/c14n/exc-without-comments/test-1.xml new file mode 100644 index 0000000..c7c42d9 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/test-1.xml @@ -0,0 +1,18 @@ +<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]> +<doc xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/"> + <e1 /> + <e2 ></e2> + <e3 name = "elem3" id="elem3" /> + <e4 name="elem4" id="elem4" ></e4> + <e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm" + xmlns:b="http://www.ietf.org" + xmlns:a="http://www.w3.org" + xmlns="http://example.org"/> + <e6 xmlns="" test="../baz" xmlns:a="http://www.w3.org"> + <e7 xmlns="http://www.ietf.org"> + <e8 xmlns="" xmlns:a="http://www.w3.org" a:foo="bar"> + <e9 xmlns="" xmlns:a="http://www.ietf.org"/> + </e8> + </e7> + </e6> +</doc> diff --git a/libxml2/test/c14n/exc-without-comments/test-1.xpath b/libxml2/test/c14n/exc-without-comments/test-1.xpath new file mode 100644 index 0000000..faa0070 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/test-1.xpath @@ -0,0 +1,3 @@ +<XPath> +(//. | //@* | //namespace::*)[ancestor-or-self::e6] +</XPath>
\ No newline at end of file diff --git a/libxml2/test/c14n/exc-without-comments/test-2.xml b/libxml2/test/c14n/exc-without-comments/test-2.xml new file mode 100644 index 0000000..83d15a7 --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/test-2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> + <SignedInfo> + <ds:CanonicalizationMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> + <Reference URI="#ndid:1234-5678-0987"> + <Transforms> + <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + </Transforms> + <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> + <DigestValue>sj1VXDB2VMCU5qmva2OtDw3kKOs=</DigestValue> + </Reference> + </SignedInfo> + <SignatureValue>...</SignatureValue> + <KeyInfo> + <X509Data> + <X509Certificate>...</X509Certificate> + </X509Data> + </KeyInfo> +</Signature> diff --git a/libxml2/test/c14n/exc-without-comments/test-2.xpath b/libxml2/test/c14n/exc-without-comments/test-2.xpath new file mode 100644 index 0000000..e57652f --- /dev/null +++ b/libxml2/test/c14n/exc-without-comments/test-2.xpath @@ -0,0 +1,6 @@ +<XPath xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> +(//. | //@* | //namespace::*) +[ + ancestor-or-self::ds:SignedInfo +] +</XPath>
\ No newline at end of file diff --git a/libxml2/test/c14n/with-comments/doc.dtd b/libxml2/test/c14n/with-comments/doc.dtd new file mode 100644 index 0000000..c460239 --- /dev/null +++ b/libxml2/test/c14n/with-comments/doc.dtd @@ -0,0 +1 @@ +<!-- Empty DTD -->
\ No newline at end of file diff --git a/libxml2/test/c14n/with-comments/example-1.xml b/libxml2/test/c14n/with-comments/example-1.xml new file mode 100644 index 0000000..ed450c7 --- /dev/null +++ b/libxml2/test/c14n/with-comments/example-1.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> + +<?xml-stylesheet href="doc.xsl" + type="text/xsl" ?> + +<!DOCTYPE doc SYSTEM "doc.dtd"> + +<doc>Hello, world!<!-- Comment 1 --></doc> + +<?pi-without-data ?> + +<!-- Comment 2 --> + +<!-- Comment 3 --> diff --git a/libxml2/test/c14n/with-comments/example-2.xml b/libxml2/test/c14n/with-comments/example-2.xml new file mode 100644 index 0000000..74eeea1 --- /dev/null +++ b/libxml2/test/c14n/with-comments/example-2.xml @@ -0,0 +1,11 @@ +<doc> + <clean> </clean> + <dirty> A B </dirty> + <mixed> + A + <clean> </clean> + B + <dirty> A B </dirty> + C + </mixed> +</doc> diff --git a/libxml2/test/c14n/with-comments/example-3.xml b/libxml2/test/c14n/with-comments/example-3.xml new file mode 100644 index 0000000..a7a1950 --- /dev/null +++ b/libxml2/test/c14n/with-comments/example-3.xml @@ -0,0 +1,18 @@ +<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]> +<doc> + <e1 /> + <e2 ></e2> + <e3 name = "elem3" id="elem3" /> + <e4 name="elem4" id="elem4" ></e4> + <e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm" + xmlns:b="http://www.ietf.org" + xmlns:a="http://www.w3.org" + xmlns="http://www.uvic.ca"/> + <e6 xmlns="" xmlns:a="http://www.w3.org"> + <e7 xmlns="http://www.ietf.org"> + <e8 xmlns="" xmlns:a="http://www.w3.org"> + <e9 xmlns="" xmlns:a="http://www.ietf.org"/> + </e8> + </e7> + </e6> +</doc> diff --git a/libxml2/test/c14n/with-comments/example-4.xml b/libxml2/test/c14n/with-comments/example-4.xml new file mode 100644 index 0000000..3fba138 --- /dev/null +++ b/libxml2/test/c14n/with-comments/example-4.xml @@ -0,0 +1,9 @@ +<!DOCTYPE doc [<!ATTLIST normId id ID #IMPLIED>]> +<doc> + <text>First line
 Second line</text> + <value>2</value> + <compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute> + <compute expr='value>"0" && value<"10" ?"valid":"error"'>valid</compute> + <norm attr=' '   
	 ' '/> + <normId id=' '   
	 ' '/> +</doc> diff --git a/libxml2/test/c14n/with-comments/example-5.xml b/libxml2/test/c14n/with-comments/example-5.xml new file mode 100644 index 0000000..92c5322 --- /dev/null +++ b/libxml2/test/c14n/with-comments/example-5.xml @@ -0,0 +1,12 @@ +<!DOCTYPE doc [ +<!ATTLIST doc attrExtEnt ENTITY #IMPLIED> +<!ENTITY ent1 "Hello"> +<!ENTITY ent2 SYSTEM "world.txt"> +<!ENTITY entExt SYSTEM "earth.gif" NDATA gif> +<!NOTATION gif SYSTEM "viewgif.exe"> +]> +<doc attrExtEnt="entExt"> + &ent1;, &ent2;! +</doc> + +<!-- Let world.txt contain "world" (excluding the quotes) --> diff --git a/libxml2/test/c14n/with-comments/example-6.xml b/libxml2/test/c14n/with-comments/example-6.xml new file mode 100644 index 0000000..31e2071 --- /dev/null +++ b/libxml2/test/c14n/with-comments/example-6.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<doc>©</doc> diff --git a/libxml2/test/c14n/with-comments/example-7.xml b/libxml2/test/c14n/with-comments/example-7.xml new file mode 100644 index 0000000..41171cb --- /dev/null +++ b/libxml2/test/c14n/with-comments/example-7.xml @@ -0,0 +1,11 @@ +<!DOCTYPE doc [ +<!ATTLIST e2 xml:space (default|preserve) 'preserve'> +<!ATTLIST e3 id ID #IMPLIED> +]> +<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <e1> + <e2 xmlns=""> + <e3 id="E3"/> + </e2> + </e1> +</doc> diff --git a/libxml2/test/c14n/with-comments/example-7.xpath b/libxml2/test/c14n/with-comments/example-7.xpath new file mode 100644 index 0000000..84ddb08 --- /dev/null +++ b/libxml2/test/c14n/with-comments/example-7.xpath @@ -0,0 +1,10 @@ +<XPath xmlns:ietf="http://www.ietf.org" > + (//.|//@*|//namespace::*) + [ + self::ietf:e1 + or + (parent::ietf:e1 and not(self::text() or self::e2)) + or + count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node()) + ] +</XPath>
\ No newline at end of file diff --git a/libxml2/test/c14n/with-comments/world.txt b/libxml2/test/c14n/with-comments/world.txt new file mode 100644 index 0000000..04fea06 --- /dev/null +++ b/libxml2/test/c14n/with-comments/world.txt @@ -0,0 +1 @@ +world
\ No newline at end of file diff --git a/libxml2/test/c14n/without-comments/doc.dtd b/libxml2/test/c14n/without-comments/doc.dtd new file mode 100644 index 0000000..c460239 --- /dev/null +++ b/libxml2/test/c14n/without-comments/doc.dtd @@ -0,0 +1 @@ +<!-- Empty DTD -->
\ No newline at end of file diff --git a/libxml2/test/c14n/without-comments/example-1.xml b/libxml2/test/c14n/without-comments/example-1.xml new file mode 100644 index 0000000..ed450c7 --- /dev/null +++ b/libxml2/test/c14n/without-comments/example-1.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> + +<?xml-stylesheet href="doc.xsl" + type="text/xsl" ?> + +<!DOCTYPE doc SYSTEM "doc.dtd"> + +<doc>Hello, world!<!-- Comment 1 --></doc> + +<?pi-without-data ?> + +<!-- Comment 2 --> + +<!-- Comment 3 --> diff --git a/libxml2/test/c14n/without-comments/example-2.xml b/libxml2/test/c14n/without-comments/example-2.xml new file mode 100644 index 0000000..74eeea1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/example-2.xml @@ -0,0 +1,11 @@ +<doc> + <clean> </clean> + <dirty> A B </dirty> + <mixed> + A + <clean> </clean> + B + <dirty> A B </dirty> + C + </mixed> +</doc> diff --git a/libxml2/test/c14n/without-comments/example-3.xml b/libxml2/test/c14n/without-comments/example-3.xml new file mode 100644 index 0000000..a7a1950 --- /dev/null +++ b/libxml2/test/c14n/without-comments/example-3.xml @@ -0,0 +1,18 @@ +<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]> +<doc> + <e1 /> + <e2 ></e2> + <e3 name = "elem3" id="elem3" /> + <e4 name="elem4" id="elem4" ></e4> + <e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm" + xmlns:b="http://www.ietf.org" + xmlns:a="http://www.w3.org" + xmlns="http://www.uvic.ca"/> + <e6 xmlns="" xmlns:a="http://www.w3.org"> + <e7 xmlns="http://www.ietf.org"> + <e8 xmlns="" xmlns:a="http://www.w3.org"> + <e9 xmlns="" xmlns:a="http://www.ietf.org"/> + </e8> + </e7> + </e6> +</doc> diff --git a/libxml2/test/c14n/without-comments/example-4.xml b/libxml2/test/c14n/without-comments/example-4.xml new file mode 100644 index 0000000..3fba138 --- /dev/null +++ b/libxml2/test/c14n/without-comments/example-4.xml @@ -0,0 +1,9 @@ +<!DOCTYPE doc [<!ATTLIST normId id ID #IMPLIED>]> +<doc> + <text>First line
 Second line</text> + <value>2</value> + <compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute> + <compute expr='value>"0" && value<"10" ?"valid":"error"'>valid</compute> + <norm attr=' '   
	 ' '/> + <normId id=' '   
	 ' '/> +</doc> diff --git a/libxml2/test/c14n/without-comments/example-5.xml b/libxml2/test/c14n/without-comments/example-5.xml new file mode 100644 index 0000000..92c5322 --- /dev/null +++ b/libxml2/test/c14n/without-comments/example-5.xml @@ -0,0 +1,12 @@ +<!DOCTYPE doc [ +<!ATTLIST doc attrExtEnt ENTITY #IMPLIED> +<!ENTITY ent1 "Hello"> +<!ENTITY ent2 SYSTEM "world.txt"> +<!ENTITY entExt SYSTEM "earth.gif" NDATA gif> +<!NOTATION gif SYSTEM "viewgif.exe"> +]> +<doc attrExtEnt="entExt"> + &ent1;, &ent2;! +</doc> + +<!-- Let world.txt contain "world" (excluding the quotes) --> diff --git a/libxml2/test/c14n/without-comments/example-6.xml b/libxml2/test/c14n/without-comments/example-6.xml new file mode 100644 index 0000000..31e2071 --- /dev/null +++ b/libxml2/test/c14n/without-comments/example-6.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<doc>©</doc> diff --git a/libxml2/test/c14n/without-comments/example-7.xml b/libxml2/test/c14n/without-comments/example-7.xml new file mode 100644 index 0000000..41171cb --- /dev/null +++ b/libxml2/test/c14n/without-comments/example-7.xml @@ -0,0 +1,11 @@ +<!DOCTYPE doc [ +<!ATTLIST e2 xml:space (default|preserve) 'preserve'> +<!ATTLIST e3 id ID #IMPLIED> +]> +<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"> + <e1> + <e2 xmlns=""> + <e3 id="E3"/> + </e2> + </e1> +</doc> diff --git a/libxml2/test/c14n/without-comments/example-7.xpath b/libxml2/test/c14n/without-comments/example-7.xpath new file mode 100644 index 0000000..84ddb08 --- /dev/null +++ b/libxml2/test/c14n/without-comments/example-7.xpath @@ -0,0 +1,10 @@ +<XPath xmlns:ietf="http://www.ietf.org" > + (//.|//@*|//namespace::*) + [ + self::ietf:e1 + or + (parent::ietf:e1 and not(self::text() or self::e2)) + or + count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node()) + ] +</XPath>
\ No newline at end of file diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-00.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-00.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-00.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-00.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-00.xpath new file mode 100644 index 0000000..717b66a --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-00.xpath @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- everything --> + ancestor-or-self::bar:Something + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-01.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-01.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-01.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-01.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-01.xpath new file mode 100644 index 0000000..8ea2795 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-01.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements or directly-used namespace nodes --> + ancestor-or-self::bar:Something and + ((name() != "bar") or parent::bar:Something) and + ((name() != "foo") or parent::foo:Something) and + ((name() != "baz") or parent::baz:Something) and + ((name() != "") or self::text()) + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-02.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-02.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-02.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-02.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-02.xpath new file mode 100644 index 0000000..37d65e0 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-02.xpath @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements or directly-used namespace nodes --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "") or + (string(self::node()) = namespace-uri(parent::node()))) + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-03.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-03.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-03.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-03.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-03.xpath new file mode 100644 index 0000000..ed8ae68 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-03.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only text, elements, or directly-used namespace nodes but not foo:Something --> + ancestor-or-self::bar:Something and + not (self::foo:Something) and + (self::text() or + (namespace-uri() != "") or + (string(self::node()) = namespace-uri(parent::node()))) + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-04.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-04.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-04.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-04.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-04.xpath new file mode 100644 index 0000000..7d0170b --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-04.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes; I am not in my parent's namespace axis --> + ancestor-or-self::bar:Something and + (count(parent::node()/namespace::*) != + count(parent::node()/namespace::* | self::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-05.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-05.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-05.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-05.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-05.xpath new file mode 100644 index 0000000..2732894 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-05.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes; I am text or have nonempty namespace URI --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "")) + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-06.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-06.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-06.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-06.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-06.xpath new file mode 100644 index 0000000..ae6589e --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-06.xpath @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only namespace nodes --> + ancestor-or-self::bar:Something and + (count(parent::node()/namespace::*) = + count(parent::node()/namespace::* | self::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-07.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-07.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-07.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-07.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-07.xpath new file mode 100644 index 0000000..bdca528 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-07.xpath @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- only directly-used namespace nodes --> + ancestor-or-self::bar:Something and + (string(self::node()) = namespace-uri(parent::node())) + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-08.xml b/libxml2/test/c14n/without-comments/merlin-c14n-two-08.xml new file mode 100644 index 0000000..714c9d1 --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-08.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie"> + <bar:Something> + <foo:Something> + <bar:Something> + <foo:Something> + <baz:Something /> + </foo:Something> + </bar:Something> + </foo:Something> + </bar:Something> +</foo:Root> diff --git a/libxml2/test/c14n/without-comments/merlin-c14n-two-08.xpath b/libxml2/test/c14n/without-comments/merlin-c14n-two-08.xpath new file mode 100644 index 0000000..24fdd3f --- /dev/null +++ b/libxml2/test/c14n/without-comments/merlin-c14n-two-08.xpath @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie"> + (//. | //@* | //namespace::*) + [ + <!-- no namespace nodes but the default on alternate elements --> + ancestor-or-self::bar:Something and + (self::text() or + (namespace-uri() != "") or + ((name() = "") and + ((count(ancestor-or-self::node()) mod 2) = 1))) + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/test-0.xml b/libxml2/test/c14n/without-comments/test-0.xml new file mode 100644 index 0000000..7e1f9d4 --- /dev/null +++ b/libxml2/test/c14n/without-comments/test-0.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<!DOCTYPE envelope [ + <!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#"> + <!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"> + <!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116"> + <!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116"> + <!ATTLIST Notaries Id ID #IMPLIED> +]> +<Object Id="object-1" MimeType="text/plain">I am the text.</Object> diff --git a/libxml2/test/c14n/without-comments/test-0.xpath b/libxml2/test/c14n/without-comments/test-0.xpath new file mode 100644 index 0000000..1fca7bf --- /dev/null +++ b/libxml2/test/c14n/without-comments/test-0.xpath @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!DOCTYPE envelope [ + <!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#"> + <!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"> + <!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116"> + <!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116"> + <!ATTLIST Notaries Id ID #IMPLIED> +]> +<XPath> + (//.|//@*|//namespace::*) + [ + self::text() + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/test-1.xml b/libxml2/test/c14n/without-comments/test-1.xml new file mode 100644 index 0000000..2156615 --- /dev/null +++ b/libxml2/test/c14n/without-comments/test-1.xml @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<!DOCTYPE envelope [ + <!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#"> + <!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"> + <!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116"> + <!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116"> + <!ATTLIST Notaries Id ID #IMPLIED> +]> + <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="signature"> + <Object Id="object-4"> + <X509Data> + <X509SubjectName> + CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE + </X509SubjectName> + <X509IssuerSerial> + <X509IssuerName> + CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE + </X509IssuerName> + <X509SerialNumber>970849936</X509SerialNumber> + </X509IssuerSerial> + <X509Certificate> + MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w + DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs + IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx + MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG + A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy + bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt + Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E + CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq + etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA + lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0 + t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW + othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV + vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ + tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV + lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0 + aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG + ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw + 9LAKPklQ/74fH18= + </X509Certificate> + </X509Data> + </Object> + </Signature>
\ No newline at end of file diff --git a/libxml2/test/c14n/without-comments/test-1.xpath b/libxml2/test/c14n/without-comments/test-1.xpath new file mode 100644 index 0000000..3c11e29 --- /dev/null +++ b/libxml2/test/c14n/without-comments/test-1.xpath @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!DOCTYPE envelope [ + <!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#"> + <!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"> + <!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116"> + <!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116"> + <!ATTLIST Notaries Id ID #IMPLIED> +]> +<XPath xmlns:dsig="&dsig;"> + (//.|//@*|//namespace::*) + [ + ancestor-or-self::dsig:X509Data + ] +</XPath> diff --git a/libxml2/test/c14n/without-comments/test-2.xml b/libxml2/test/c14n/without-comments/test-2.xml new file mode 100644 index 0000000..9fda49e --- /dev/null +++ b/libxml2/test/c14n/without-comments/test-2.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<n0:local xmlns:n0="foo://bar" xmlns:n3="ftp://example.org"> + <n1:elem2 xmlns:n1="http://example.net" xml:lang="en"> + <n3:stuff xmlns:n3="ftp://example.org"/> + </n1:elem2> +</n0:local> + +
\ No newline at end of file diff --git a/libxml2/test/c14n/without-comments/test-2.xpath b/libxml2/test/c14n/without-comments/test-2.xpath new file mode 100644 index 0000000..9653bc3 --- /dev/null +++ b/libxml2/test/c14n/without-comments/test-2.xpath @@ -0,0 +1,8 @@ + +<XPath xmlns:n1="http://example.net" > + (//. | //@* | //namespace::*) + [ + ancestor-or-self::n1:elem2 + ] +</XPath> +
\ No newline at end of file diff --git a/libxml2/test/c14n/without-comments/test-3.xml b/libxml2/test/c14n/without-comments/test-3.xml new file mode 100644 index 0000000..c7c42d9 --- /dev/null +++ b/libxml2/test/c14n/without-comments/test-3.xml @@ -0,0 +1,18 @@ +<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]> +<doc xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/"> + <e1 /> + <e2 ></e2> + <e3 name = "elem3" id="elem3" /> + <e4 name="elem4" id="elem4" ></e4> + <e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm" + xmlns:b="http://www.ietf.org" + xmlns:a="http://www.w3.org" + xmlns="http://example.org"/> + <e6 xmlns="" test="../baz" xmlns:a="http://www.w3.org"> + <e7 xmlns="http://www.ietf.org"> + <e8 xmlns="" xmlns:a="http://www.w3.org" a:foo="bar"> + <e9 xmlns="" xmlns:a="http://www.ietf.org"/> + </e8> + </e7> + </e6> +</doc> diff --git a/libxml2/test/c14n/without-comments/test-3.xpath b/libxml2/test/c14n/without-comments/test-3.xpath new file mode 100644 index 0000000..faa0070 --- /dev/null +++ b/libxml2/test/c14n/without-comments/test-3.xpath @@ -0,0 +1,3 @@ +<XPath> +(//. | //@* | //namespace::*)[ancestor-or-self::e6] +</XPath>
\ No newline at end of file diff --git a/libxml2/test/c14n/without-comments/world.txt b/libxml2/test/c14n/without-comments/world.txt new file mode 100644 index 0000000..04fea06 --- /dev/null +++ b/libxml2/test/c14n/without-comments/world.txt @@ -0,0 +1 @@ +world
\ No newline at end of file |