[libxml2]Add libxml2 library

This commit is contained in:
zhoujiale
2026-07-26 16:57:28 +08:00
committed by zhoujiale
parent 0a44ec8a06
commit e841ac915d
3790 changed files with 668244 additions and 0 deletions
@@ -0,0 +1 @@
<!-- Empty DTD -->
@@ -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 -->
@@ -0,0 +1,11 @@
<doc>
<clean> </clean>
<dirty> A B </dirty>
<mixed>
A
<clean> </clean>
B
<dirty> A B </dirty>
C
</mixed>
</doc>
@@ -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>
@@ -0,0 +1,9 @@
<!DOCTYPE doc [<!ATTLIST normId id ID #IMPLIED>]>
<doc>
<text>First line&#x0d;&#10;Second line</text>
<value>&#x32;</value>
<compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute>
<compute expr='value>"0" &amp;&amp; value&lt;"10" ?"valid":"error"'>valid</compute>
<norm attr=' &apos; &#x20;&#13;&#xa;&#9; &apos; '/>
<normId id=' &apos; &#x20;&#13;&#xa;&#9; &apos; '/>
</doc>
@@ -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) -->
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<doc>&#169;</doc>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -0,0 +1 @@
world
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -0,0 +1 @@
#default
@@ -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>
@@ -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>
@@ -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>
@@ -0,0 +1,3 @@
<XPath>
(//. | //@* | //namespace::*)[ancestor-or-self::e6]
</XPath>
@@ -0,0 +1 @@
a

Some files were not shown because too many files have changed in this diff Show More