Skip to content

Commit 5d96050

Browse files
committed
Fix test failures for TypedData conversion and newer libxml2
- Update error message expectation for unbound namespace (TypedData reports type name instead of generic "Data") - Remove platform-specific branches for parser error messages that now match across platforms with newer libxml2 - Fix reader encoding test to expect ISO_8859_1 on all platforms - Normalize c14n result file line endings to LF - Make docbook enabled test platform-independent
1 parent 8c063f5 commit 5d96050

31 files changed

Lines changed: 12290 additions & 12305 deletions

test/c14n/given/example-1.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<?xml version="1.0"?>
2-
3-
<?xml-stylesheet href="doc.xsl"
4-
type="text/xsl" ?>
5-
6-
<!DOCTYPE doc SYSTEM "doc.dtd">
7-
8-
<doc>Hello, world!<!-- Comment 1 --></doc>
9-
10-
<?pi-without-data ?>
11-
12-
<!-- Comment 2 -->
13-
14-
<!-- Comment 3 -->
1+
<?xml version="1.0"?>
2+
3+
<?xml-stylesheet href="doc.xsl"
4+
type="text/xsl" ?>
5+
6+
<!DOCTYPE doc SYSTEM "doc.dtd">
7+
8+
<doc>Hello, world!<!-- Comment 1 --></doc>
9+
10+
<?pi-without-data ?>
11+
12+
<!-- Comment 2 -->
13+
14+
<!-- Comment 3 -->

test/c14n/given/example-2.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<doc>
2-
<clean> </clean>
3-
<dirty> A B </dirty>
4-
<mixed>
5-
A
6-
<clean> </clean>
7-
B
8-
<dirty> A B </dirty>
9-
C
10-
</mixed>
11-
</doc>
1+
<doc>
2+
<clean> </clean>
3+
<dirty> A B </dirty>
4+
<mixed>
5+
A
6+
<clean> </clean>
7+
B
8+
<dirty> A B </dirty>
9+
C
10+
</mixed>
11+
</doc>

test/c14n/given/example-3.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]>
2-
<doc>
3-
<e1 />
4-
<e2 ></e2>
5-
<e3 name = "elem3" id="elem3" />
6-
<e4 name="elem4" id="elem4" ></e4>
7-
<e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm"
8-
xmlns:b="http://www.ietf.org"
9-
xmlns:a="http://www.w3.org"
10-
xmlns="http://www.uvic.ca"/>
11-
<e6 xmlns="" xmlns:a="http://www.w3.org">
12-
<e7 xmlns="http://www.ietf.org">
13-
<e8 xmlns="" xmlns:a="http://www.w3.org">
14-
<e9 xmlns="" xmlns:a="http://www.ietf.org" attr="default"/>
15-
</e8>
16-
</e7>
17-
</e6>
18-
</doc>
1+
<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]>
2+
<doc>
3+
<e1 />
4+
<e2 ></e2>
5+
<e3 name = "elem3" id="elem3" />
6+
<e4 name="elem4" id="elem4" ></e4>
7+
<e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm"
8+
xmlns:b="http://www.ietf.org"
9+
xmlns:a="http://www.w3.org"
10+
xmlns="http://www.uvic.ca"/>
11+
<e6 xmlns="" xmlns:a="http://www.w3.org">
12+
<e7 xmlns="http://www.ietf.org">
13+
<e8 xmlns="" xmlns:a="http://www.w3.org">
14+
<e9 xmlns="" xmlns:a="http://www.ietf.org" attr="default"/>
15+
</e8>
16+
</e7>
17+
</e6>
18+
</doc>

test/c14n/given/example-4.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<!DOCTYPE doc [<!ATTLIST normId id ID #IMPLIED>]>
2-
<doc>
3-
<text>First line&#x0d;&#10;Second line</text>
4-
<value>&#x32;</value>
5-
<compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute>
6-
<compute expr='value>"0" &amp;&amp; value&lt;"10" ?"valid":"error"'>valid</compute>
7-
<norm attr=' &apos; &#x20;&#13;&#xa;&#9; &apos; '/>
8-
<normId id=' &apos; &#x20;&#13;&#xa;&#9; &apos; '/>
9-
</doc>
1+
<!DOCTYPE doc [<!ATTLIST normId id ID #IMPLIED>]>
2+
<doc>
3+
<text>First line&#x0d;&#10;Second line</text>
4+
<value>&#x32;</value>
5+
<compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute>
6+
<compute expr='value>"0" &amp;&amp; value&lt;"10" ?"valid":"error"'>valid</compute>
7+
<norm attr=' &apos; &#x20;&#13;&#xa;&#9; &apos; '/>
8+
<normId id=' &apos; &#x20;&#13;&#xa;&#9; &apos; '/>
9+
</doc>

test/c14n/given/example-5.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<!DOCTYPE doc [
2-
<!ATTLIST doc attrExtEnt ENTITY #IMPLIED>
3-
<!ENTITY ent1 "Hello">
4-
<!ENTITY ent2 SYSTEM "world.txt">
5-
<!ENTITY entExt SYSTEM "earth.gif" NDATA gif>
6-
<!NOTATION gif SYSTEM "viewgif.exe">
7-
]>
8-
<doc attrExtEnt="entExt">
9-
&ent1;, &ent2;!
10-
</doc>
11-
12-
<!-- Let world.txt contain "world" (excluding the quotes) -->
1+
<!DOCTYPE doc [
2+
<!ATTLIST doc attrExtEnt ENTITY #IMPLIED>
3+
<!ENTITY ent1 "Hello">
4+
<!ENTITY ent2 SYSTEM "world.txt">
5+
<!ENTITY entExt SYSTEM "earth.gif" NDATA gif>
6+
<!NOTATION gif SYSTEM "viewgif.exe">
7+
]>
8+
<doc attrExtEnt="entExt">
9+
&ent1;, &ent2;!
10+
</doc>
11+
12+
<!-- Let world.txt contain "world" (excluding the quotes) -->

test/c14n/given/example-6.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<doc>&#169;</doc>
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<doc>&#169;</doc>

test/c14n/given/example-7.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<!DOCTYPE doc [
2-
<!ATTLIST e2 xml:space (default|preserve) 'preserve'>
3-
<!ATTLIST e3 id ID #IMPLIED>
4-
]>
5-
<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
6-
<e1>
7-
<e2 xmlns="">
8-
<e3 id="E3"/>
9-
</e2>
10-
</e1>
11-
</doc>
1+
<!DOCTYPE doc [
2+
<!ATTLIST e2 xml:space (default|preserve) 'preserve'>
3+
<!ATTLIST e3 id ID #IMPLIED>
4+
]>
5+
<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
6+
<e1>
7+
<e2 xmlns="">
8+
<e3 id="E3"/>
9+
</e2>
10+
</e1>
11+
</doc>

test/c14n/given/example-8.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<!DOCTYPE doc [
2-
<!ATTLIST e2 xml:space (default|preserve) 'preserve'>
3-
<!ATTLIST e3 id ID #IMPLIED>
4-
]>
5-
<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="something/else">
6-
<e1>
7-
<e2 xmlns="" xml:id="abc" xml:base="bar/">
8-
<e3 id="E3" xml:base="foo"/>
9-
</e2>
10-
</e1>
11-
</doc>
1+
<!DOCTYPE doc [
2+
<!ATTLIST e2 xml:space (default|preserve) 'preserve'>
3+
<!ATTLIST e3 id ID #IMPLIED>
4+
]>
5+
<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org" xml:base="something/else">
6+
<e1>
7+
<e2 xmlns="" xml:id="abc" xml:base="bar/">
8+
<e3 id="E3" xml:base="foo"/>
9+
</e2>
10+
</e1>
11+
</doc>

test/c14n/given/example-8.xpath

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<XPath xmlns:ietf="http://www.ietf.org" >
2-
(//.|//@*|//namespace::*)
3-
[
4-
self::ietf:e1
5-
or
6-
(parent::ietf:e1 and not(self::text() or self::e2))
7-
or
8-
count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())
9-
]
1+
<XPath xmlns:ietf="http://www.ietf.org" >
2+
(//.|//@*|//namespace::*)
3+
[
4+
self::ietf:e1
5+
or
6+
(parent::ietf:e1 and not(self::text() or self::e2))
7+
or
8+
count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())
9+
]
1010
</XPath>

test/model/atom.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<?xml-stylesheet type="text/xsl" href="my_stylesheet.xsl"?>
3-
<feed xmlns="http://www.w3.org/2005/Atom">
4-
<!-- Not a valid atom entry -->
5-
<entry>
6-
<title type="html"><![CDATA[<<strong>>]]></title>
7-
<content type="xhtml">
8-
<xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml">
9-
<xhtml:p>hi there</xhtml:p>
10-
</xhtml:div>
11-
</content>
12-
</entry>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<?xml-stylesheet type="text/xsl" href="my_stylesheet.xsl"?>
3+
<feed xmlns="http://www.w3.org/2005/Atom">
4+
<!-- Not a valid atom entry -->
5+
<entry>
6+
<title type="html"><![CDATA[<<strong>>]]></title>
7+
<content type="xhtml">
8+
<xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml">
9+
<xhtml:p>hi there</xhtml:p>
10+
</xhtml:div>
11+
</content>
12+
</entry>
1313
</feed>

0 commit comments

Comments
 (0)