[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
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<doc xmlns:xi="http://www.w3.org/2003/XInclude" xml:base="one/two">
<elem xml:base="http://example.org/one/two">
http://example.org/one/two
</elem><elem xml:base="../../ents/one/two2">
ents/one/two2
</elem><elem xml:base="../../ents/one2/two">
ents/one2/two
</elem><elem xml:base="two/three/four">
docs/one/two/three/four
</elem>
</doc>
+26
View File
@@ -0,0 +1,26 @@
0 1 doc 0 0
1 14 #text 0 1
1 1 elem 0 0
2 3 #text 0 1
http://example.org/one/two
1 15 elem 0 0
1 1 elem 0 0
2 3 #text 0 1
ents/one/two2
1 15 elem 0 0
1 1 elem 0 0
2 3 #text 0 1
ents/one2/two
1 15 elem 0 0
1 1 elem 0 0
2 3 #text 0 1
docs/one/two/three/four
1 15 elem 0 0
1 14 #text 0 1
0 15 doc 0 0
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns:xi="http://www.w3.org/2001/XInclude">
<t1 xmlns:xi="http://www.w3.org/2001/XInclude" xml:base="../ents/coalesce1.xml">
start
start
end
</t1>
</test>
+17
View File
@@ -0,0 +1,17 @@
0 1 test 0 0
1 14 #text 0 1
1 1 t1 0 0
2 3 #text 0 1
start
2 3 #text 0 1
start
2 3 #text 0 1
end
1 15 t1 0 0
1 14 #text 0 1
0 15 test 0 0
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!DOCTYPE book [
<!ELEMENT book (doc)*>
<!ELEMENT doc (isid)*>
<!ELEMENT isid EMPTY>
<!ATTLIST isid myid ID #IMPLIED>
]>
<book>
<doc>
<isid myid="mine"/>
<isid myid="dup"/>
</doc>
<!-- including another XML document with IDs -->
<doc xml:base="../ents/ids.xml">
<isid myid="dup"/>
<isid myid="foo"/>
<isid myid="bar"/>
</doc>
</book>
+35
View File
@@ -0,0 +1,35 @@
0 10 book 0 0
0 1 book 0 0
1 14 #text 0 1
1 1 doc 0 0
2 14 #text 0 1
2 1 isid 1 0
2 14 #text 0 1
2 1 isid 1 0
2 14 #text 0 1
1 15 doc 0 0
1 14 #text 0 1
1 8 #comment 0 1 including another XML document with IDs
1 14 #text 0 1
1 1 doc 0 0
2 14 #text 0 1
2 1 isid 1 0
2 14 #text 0 1
2 1 isid 1 0
2 14 #text 0 1
2 1 isid 1 0
2 14 #text 0 1
1 15 doc 0 0
1 14 #text 0 1
0 15 book 0 0
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<!-- Simple test of a fallback on unavailable URI -->
<warning>Inclusion failed</warning>
</x>
+1
View File
@@ -0,0 +1 @@
I/O warning : failed to load "test/XInclude/docs/something.xml": No such file or directory
+12
View File
@@ -0,0 +1,12 @@
0 1 x 0 0
1 14 #text 0 1
1 8 #comment 0 1 Simple test of a fallback on unavailable URI
1 14 #text 0 1
1 1 warning 0 0
2 3 #text 0 1 Inclusion failed
1 15 warning 0 0
1 14 #text 0 1
0 15 x 0 0
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<a>
There is no b.xml ...
There is no c.xml ...
</a>
@@ -0,0 +1,2 @@
I/O warning : failed to load "test/XInclude/docs/b.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/c.xml": No such file or directory
+11
View File
@@ -0,0 +1,11 @@
0 1 a 0 0
1 14 #text 0 1
1 3 #text 0 1 There is no b.xml ...
1 14 #text 0 1
1 3 #text 0 1 There is no c.xml ...
1 14 #text 0 1
0 15 a 0 0
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<a>
<doc xml:base="../ents/something.xml">
<p>something</p>
<p>really</p>
<p>simple</p>
</doc>
</a>
+25
View File
@@ -0,0 +1,25 @@
0 1 a 0 0
1 14 #text 0 1
1 1 doc 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 something
2 15 p 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 really
2 15 p 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 simple
2 15 p 0 0
2 14 #text 0 1
1 15 doc 0 0
1 14 #text 0 1
0 15 a 0 0
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<a>
<doc xml:base="../ents/something.xml">
<p>something</p>
<p>really</p>
<p>simple</p>
</doc>
</a>
@@ -0,0 +1 @@
I/O warning : failed to load "test/XInclude/docs/c.xml": No such file or directory
+29
View File
@@ -0,0 +1,29 @@
0 1 a 0 0
1 14 #text 0 1
1 14 #text 0 1
1 1 doc 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 something
2 15 p 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 really
2 15 p 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 simple
2 15 p 0 0
2 14 #text 0 1
1 15 doc 0 0
1 14 #text 0 1
1 14 #text 0 1
0 15 a 0 0
+51
View File
@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<a>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
<elem/>
</a>
+16
View File
@@ -0,0 +1,16 @@
I/O warning : failed to load "test/XInclude/docs/a01.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a02.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a03.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a04.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a05.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a06.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a07.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a08.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a09.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a10.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a11.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a12.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a13.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a14.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a15.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/a16.xml": No such file or directory
+116
View File
@@ -0,0 +1,116 @@
0 1 a 0 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 1 elem 1 0
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
1 14 #text 0 1
0 15 a 0 0
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<doc>
</doc>
@@ -0,0 +1,2 @@
I/O warning : failed to load "test/XInclude/docs/b.xml": No such file or directory
I/O warning : failed to load "test/XInclude/docs/c.xml": No such file or directory
@@ -0,0 +1,6 @@
0 1 doc 0 0
1 14 #text 0 1
1 14 #text 0 1
0 15 doc 0 0
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<x xmlns:xi="http://www.w3.org/2001/XInclude">
<a>text</a>
<b>
<a>text</a>
</b>
<b>
<a>text</a>
</b>
<b>
<a>text</a>
</b>
</x>
@@ -0,0 +1 @@
I/O warning : failed to load "test/XInclude/without-reader/404.xml": No such file or directory
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<doc>
text not found
</doc>
@@ -0,0 +1 @@
I/O warning : failed to load "test/XInclude/docs/404.txt": No such file or directory
@@ -0,0 +1,7 @@
0 1 doc 0 0
1 14 #text 0 1
1 3 #text 0 1 text not found
1 14 #text 0 1
0 15 doc 0 0
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<!-- Simple test of including another XML document -->
<doc xml:base="../ents/something.xml">
<p>something</p>
<p>really</p>
<p>simple</p>
</doc>
</x>
+28
View File
@@ -0,0 +1,28 @@
0 1 x 0 0
1 14 #text 0 1
1 8 #comment 0 1 Simple test of including another XML document
1 14 #text 0 1
1 1 doc 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 something
2 15 p 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 really
2 15 p 0 0
2 14 #text 0 1
2 1 p 0 0
3 3 #text 0 1 simple
2 15 p 0 0
2 14 #text 0 1
1 15 doc 0 0
1 14 #text 0 1
0 15 x 0 0
@@ -0,0 +1,3 @@
./test/XInclude/docs/invalid_char.xml:2: element include: XInclude error : test/XInclude/ents/invalid_char.txt contains invalid char
./test/XInclude/docs/invalid_char.xml:2: element include: XInclude error : could not load test/XInclude/ents/invalid_char.txt, and no fallback was found
./test/XInclude/docs/invalid_char.xml : failed to parse
@@ -0,0 +1,3 @@
0 1 x 0 0
1 14 #text 0 1
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<doc xmlns:xi="http://www.w3.org/2001/XInclude">
Network access is not allowed
</doc>
@@ -0,0 +1 @@
I/O error : failed to load "http://example.invalid/file.txt": Attempt to load network entity
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<doc xmlns:xi="http://www.w3.org/2001/XInclude">
<p>Network access is not allowed</p>
</doc>
@@ -0,0 +1 @@
I/O error : failed to load "http://example.invalid/file.xml": Attempt to load network entity
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<p>Something</p>
<d><p>Something</p></d>
<d><p>Something</p></d>
</x>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<p>Something</p>
<d><p>Something</p></d>
<d><p>Something</p></d>
</x>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE reference>
<reference xmlns:xi="http://www.w3.org/2001/XInclude">
<para id="a" xml:base="../ents/issue733-1.xml">Content 1</para>
<para id="a" xml:base="../ents/issue733-2.xml">Content 2</para>
</reference>
+16
View File
@@ -0,0 +1,16 @@
0 1 reference 0 0
1 14 #text 0 1
1 1 para 0 0
2 3 #text 0 1 Content 1
1 15 para 0 0
1 14 #text 0 1
1 1 para 0 0
2 3 #text 0 1 Content 2
1 15 para 0 0
1 14 #text 0 1
1 14 #text 0 1
0 15 reference 0 0
+2
View File
@@ -0,0 +1,2 @@
./test/XInclude/without-reader/loop.xml:2: element include: XInclude error : inclusion loop detected
./test/XInclude/without-reader/loop.xml : failed to parse
@@ -0,0 +1,2 @@
./test/XInclude/without-reader/max-recurse.xml:42: element include: XInclude error : maximum recursion depth exceeded
./test/XInclude/without-reader/max-recurse.xml : failed to parse
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<!-- Simple test of including a set of nodes from an XML document -->
<p xml:base="../ents/something.xml">something</p><p xml:base="../ents/something.xml">really</p><p xml:base="../ents/something.xml">simple</p>
</x>
+18
View File
@@ -0,0 +1,18 @@
0 1 x 0 0
1 14 #text 0 1
1 8 #comment 0 1 Simple test of including a set of nodes from an XML document
1 14 #text 0 1
1 1 p 0 0
2 3 #text 0 1 something
1 15 p 0 0
1 1 p 0 0
2 3 #text 0 1 really
1 15 p 0 0
1 1 p 0 0
2 3 #text 0 1 simple
1 15 p 0 0
1 14 #text 0 1
0 15 x 0 0
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2003/XInclude">
<!-- Simple test of including a set of nodes from an XML document -->
<p xml:base="../ents/something.xml">something</p><p xml:base="../ents/something.xml">really</p><p xml:base="../ents/something.xml">simple</p>
</x>
+18
View File
@@ -0,0 +1,18 @@
0 1 x 0 0
1 14 #text 0 1
1 8 #comment 0 1 Simple test of including a set of nodes from an XML document
1 14 #text 0 1
1 1 p 0 0
2 3 #text 0 1 something
1 15 p 0 0
1 1 p 0 0
2 3 #text 0 1 really
1 15 p 0 0
1 1 p 0 0
2 3 #text 0 1 simple
1 15 p 0 0
1 14 #text 0 1
0 15 x 0 0
+2
View File
@@ -0,0 +1,2 @@
./test/XInclude/docs/nodes3.xml:3: element include: XInclude error : Invalid fragment identifier in URI ../ents/something.xml#xpointer(//p) use the xpointer attribute
./test/XInclude/docs/nodes3.xml : failed to parse
+6
View File
@@ -0,0 +1,6 @@
0 1 x 0 0
1 14 #text 0 1
1 8 #comment 0 1 Simple test of including a set of nodes from an XML document
1 14 #text 0 1
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<doc xmlns:xi="http://www.w3.org/2001/XInclude">
<ns:elem xmlns:ns="urn:foo" xml:id="a"/>
<elem xmlns:ns="urn:foo">
<ns:elem xml:id="a"/>
</elem>
<ns:elem xmlns:ns="urn:bar"/>
</doc>
+1
View File
@@ -0,0 +1 @@
I/O warning : failed to load "test/XInclude/without-reader/b.xml": No such file or directory
+3
View File
@@ -0,0 +1,3 @@
<?xml version="1.0"?>
<this><sub-inc xml:base="../ents/sub-inc.ent">is a test
</sub-inc></this>
@@ -0,0 +1,6 @@
0 1 this 0 0
1 1 sub-inc 0 0
2 3 #text 0 1 is a test
1 15 sub-inc 0 0
0 15 this 0 0
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<book xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">
<chapter>
<para xml:id="t100">Introduction</para>
</chapter>
<chapter>
<para xml:id="t100">Introduction</para>
</chapter>
</book>
+26
View File
@@ -0,0 +1,26 @@
0 1 book 0 0
1 14 #text 0 1
1 1 chapter 0 0
2 14 #text 0 1
2 1 para 0 0
3 3 #text 0 1 Introduction
2 15 para 0 0
2 14 #text 0 1
1 15 chapter 0 0
1 14 #text 0 1
1 1 chapter 0 0
2 14 #text 0 1
2 1 para 0 0
3 3 #text 0 1 Introduction
2 15 para 0 0
2 14 #text 0 1
1 15 chapter 0 0
1 14 #text 0 1
0 15 book 0 0
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<!-- Simple test of including another text document -->
test with accents in ISO-8859-1: À Á é è
</x>
@@ -0,0 +1,11 @@
0 1 x 0 0
1 14 #text 0 1
1 8 #comment 0 1 Simple test of including another text document
1 14 #text 0 1
1 3 #text 0 1 test with accents in ISO-8859-1: À Á é è
1 14 #text 0 1
0 15 x 0 0
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
<!-- Simple test of including another text document -->
this is some text in ASCII
</x>
@@ -0,0 +1,11 @@
0 1 x 0 0
1 14 #text 0 1
1 8 #comment 0 1 Simple test of including another text document
1 14 #text 0 1
1 3 #text 0 1 this is some text in ASCII
1 14 #text 0 1
0 15 x 0 0